Commit 6dc50443 authored by Zhu Yong's avatar Zhu Yong
Browse files

correct misspelled words

parent b767e644
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import (
)

// BlockConnection sends kinetic message to devices and wait for response message from device.
// For all API fucntions, it will only return after response from kinetic device handled.
// For all API functions, it will only return after response from kinetic device handled.
// If no data required from kinetic device, API function will return Status and error.
// If any data required from kinetic device, the data will be one of the return values.
type BlockConnection struct {
@@ -200,13 +200,13 @@ func (conn *BlockConnection) BatchStart() (Status, error) {
}

// BatchPut puts objects to kinetic drive, as a batch job. Batch PUT / DELETE won't expect acknowledgement
// from kinetic device. Status for batch PUT / DELETE will only availabe in response message for BatchEnd.
// from kinetic device. Status for batch PUT / DELETE will only available in response message for BatchEnd.
func (conn *BlockConnection) BatchPut(entry *Record) error {
	return conn.nbc.BatchPut(entry)
}

// BatchDelete delete object from kinetic drive, as a batch job. Batch PUT / DELETE won't expect acknowledgement
// from kinetic device. Status for batch PUT / DELETE will only availabe in response message for BatchEnd.
// from kinetic device. Status for batch PUT / DELETE will only available in response message for BatchEnd.
func (conn *BlockConnection) BatchDelete(entry *Record) error {
	return conn.nbc.BatchDelete(entry)
}
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import (
)

// Callback is the interface define actions for MessageType.
// Success is called when XXXXX_RESPONSE message recieved from drive without problem.
// Success is called when XXXXX_RESPONSE message received from drive without problem.
// Failure is called when XXXXX_RESPONSE message status code is not OK, or any other kind of failure.
// Done return true if either Success or Failure is called to indicate XXXXX_RESPONSE received and processed.
// Status return the MessateType operation status.
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import (
)

// ResponseHandler is the handler for XXXXX_RESPONSE message from drive.
// For each operation, a unique ResponseHandler is requried
// For each operation, a unique ResponseHandler is required
type ResponseHandler struct {
	callback Callback
	done     bool
@@ -71,7 +71,7 @@ func (h *ResponseHandler) wait() {
}

// NewResponseHandler is helper function to build a ResponseHandler with call as the Callback.
// For each operation, a unique ResponseHandler is requried
// For each operation, a unique ResponseHandler is required
func NewResponseHandler(call Callback) *ResponseHandler {
	h := &ResponseHandler{callback: call, done: false, cond: sync.NewCond(&sync.Mutex{})}
	return h
+2 −2
Original line number Diff line number Diff line
@@ -58,12 +58,12 @@ const (
	LogLevelDebug LogLevel = LogLevel(logrus.DebugLevel)
)

// SetLogLevel sets kinetic libary log level
// SetLogLevel sets kinetic library log level
func SetLogLevel(l LogLevel) {
	klog.Level = logrus.Level(l)
}

// SetLogOutput sets kinetic libary log output
// SetLogOutput sets kinetic library log output
func SetLogOutput(out io.Writer) {
	klog.Out = out
}
+2 −2
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ func (conn *NonBlockConnection) BatchStart(h *ResponseHandler) error {
}

// BatchPut puts objects to kinetic drive, as a batch job. Batch PUT / DELETE won't expect acknowledgement
// from kinetic device. Status for batch PUT / DELETE will only availabe in response message for BatchEnd.
// from kinetic device. Status for batch PUT / DELETE will only available in response message for BatchEnd.
func (conn *NonBlockConnection) BatchPut(entry *Record) error {
	// Batch operation PUT
	conn.batchMu.Lock()
@@ -250,7 +250,7 @@ func (conn *NonBlockConnection) BatchPut(entry *Record) error {
}

// BatchDelete delete object from kinetic drive, as a batch job. Batch PUT / DELETE won't expect acknowledgement
// from kinetic device. Status for batch PUT / DELETE will only availabe in response message for BatchEnd.
// from kinetic device. Status for batch PUT / DELETE will only available in response message for BatchEnd.
func (conn *NonBlockConnection) BatchDelete(entry *Record) error {
	// Batch operation DELETE
	conn.batchMu.Lock()
Loading