Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProbeEventFieldPath = "spec.containers{kbagent}" ProbeEventReportingController = "kbagent" ProbeEventSourceComponent = "kbagent" )
Variables ¶
View Source
var ( ErrNotDefined = errors.New("notDefined") ErrNotImplemented = errors.New("notImplemented") ErrBadRequest = errors.New("badRequest") ErrInProgress = errors.New("inProgress") ErrBusy = errors.New("busy") ErrTimedOut = errors.New("timedOut") ErrFailed = errors.New("failed") ErrInternalError = errors.New("internalError") ErrUnknown = errors.New("unknown") )
View Source
var ( ServiceAction = &Service{ Kind: "Action", Version: "v1.0", URI: "/v1.0/action", } ServiceProbe = &Service{ Kind: "Probe", Version: "v1.0", URI: "/v1.0/probe", } ServiceStreaming = &Service{ Kind: "Streaming", Version: "v1.0", URI: "/v1.0/streaming", } )
Functions ¶
func Error2Type ¶
func Type2Error ¶
Types ¶
type Action ¶
type Action struct { Name string `json:"name"` Exec *ExecAction `json:"exec,omitempty"` TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"` }
type ActionRequest ¶
type ActionResponse ¶
type ExecAction ¶
type NewReplicaTask ¶
type NewReplicaTask struct { Remote string `json:"remote"` // the remote address of the data source Port int32 `json:"port"` Replicas string `json:"replicas"` // replicas to load the data Parameters map[string]string `json:"parameters,omitempty"` // parameters for data dump and load TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` }
type Probe ¶
type Probe struct { Instance string `json:"instance"` Action string `json:"action"` InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"` PeriodSeconds int32 `json:"periodSeconds,omitempty"` SuccessThreshold int32 `json:"successThreshold,omitempty"` FailureThreshold int32 `json:"failureThreshold,omitempty"` ReportPeriodSeconds int32 `json:"reportPeriodSeconds,omitempty"` }
type ProbeEvent ¶
type ProbeEvent struct { Instance string `json:"instance"` Probe string `json:"probe"` Code int32 `json:"code"` Output []byte `json:"output,omitempty"` // output of the probe on success, or latest succeed output on failure Message string `json:"message,omitempty"` // message of the probe on failure }
type RetryPolicy ¶
type Task ¶
type Task struct { Instance string `json:"instance"` Task string `json:"task"` UID string `json:"UID"` // the unique identifier of the task Replicas string `json:"replicas"` // target replicas to run the task NotifyAtFinish bool `json:"notifyAtFinish,omitempty"` // whether to notify the controller when the task is finished ReportPeriodSeconds int32 `json:"reportPeriodSeconds,omitempty"` // the period to report the progress of the task NewReplica *NewReplicaTask `json:"newReplica,omitempty"` }
type TaskEvent ¶
type TaskEvent struct { Instance string `json:"instance"` Task string `json:"task"` UID string `json:"UID"` Replica string `json:"replica"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Code int32 `json:"code"` Output []byte `json:"output,omitempty"` // output of the task on success Message string `json:"message,omitempty"` // message of the task on failure }
Click to show internal directories.
Click to hide internal directories.