Documentation
¶
Index ¶
- Constants
- func NewDummyProcessManager() dummyProcessManager
- func NewUtilityWorker(clusterSettings *common.ClusterSettings, processName string, ...) *utilityWorker
- type AppLogFunction
- type Command
- type MessageDeliver
- type OnDeployAckMsg
- type OnDeployActionObject
- type ProcessConfig
- type ProcessDetails
- type ProcessManager
- type ResponseMessage
Constants ¶
View Source
const ( CompileHandler uint8 = iota InitHandler DebugHandlerStart DebugHandlerStop OnDeployHandler )
For InitEvent
View Source
const ( LogLevelChange uint8 = iota TimeContextSize )
For HandlerDynamicSettings
View Source
const ( VbMap uint8 = iota VbAddChanges FilterVb )
For VbSettings
View Source
const ( // maybe init also comes in this category Pause uint8 = iota Resume Stop )
For LifeCycleChange
View Source
const ( LatencyStats uint8 = iota Insight FailureStats ExecutionStats LcbExceptions CurlLatencyStats ProcessedEvents StatsAckBytes AllStats )
For StatsEvent
View Source
const ( DcpMutation uint8 = iota DcpDeletion DcpNoOp DcpCollectionDelete )
For DcpEvent
View Source
const ( RawDatatype uint8 = iota JsonDatatype )
View Source
const (
AckBytes uint8 = iota
)
View Source
const (
FeatureMatrix uint8 = iota
)
GlobalConfigChange
Variables ¶
This section is empty.
Functions ¶
func NewDummyProcessManager ¶
func NewDummyProcessManager() dummyProcessManager
func NewUtilityWorker ¶
func NewUtilityWorker(clusterSettings *common.ClusterSettings, processName string, systemConfig serverConfig.SystemConfig) *utilityWorker
Types ¶
type AppLogFunction ¶
type Command ¶
type Command uint8
const ( // Initialise the new handler InitEvent Command = iota // Functions dynamic settings HandlerDynamicSettings // Vb related settings VbSettings // pause/resume/stop LifeCycleChange // For statistics StatsEvent // Dcp event DcpEvent // GlobalConfig change GlobalConfigChange // InternalComm change InternalComm )
type MessageDeliver ¶
type MessageDeliver interface {
// ReceiveMessage is when msg is received from the c++ side
ReceiveMessage(msg *ResponseMessage)
// ApplicationLog will write the message to the application log
ApplicationLog(msg string)
}
type OnDeployAckMsg ¶
type OnDeployAckMsg struct {
Status checkpointManager.OnDeployState `json:"on_deploy_status"`
}
For OnDeploy status received from C++ layer
type OnDeployActionObject ¶
type ProcessConfig ¶
type ProcessConfig struct {
Username string
Password string
Address string
NsServerPort string
// ipv4/ipv6
IPMode common.IpMode
BreakpadOn bool
DebuggerPort string
DiagDir string
EventingDir string
EventingPort string
EventingSSLPort string
ExecPath string
CertPath string
ClientCertPath string
ClientKeyPath string
// Id used to create tcp socket
ID string
InstanceID string
SingleFunctionMode bool
AppLogCallback AppLogFunction
}
func (ProcessConfig) String ¶
func (p ProcessConfig) String() string
type ProcessDetails ¶
type ProcessManager ¶
type ProcessManager interface {
// Start will start the process. response channel should be used
// to get response
// CHECK: if this should return error or not
// or process manager should takecare of the errors internally
Start() (<-chan *ResponseMessage, error)
StartWithContext(ctx context.Context) (<-chan *ResponseMessage, error)
InitEvent(version uint32, opcode uint8, handlerID []byte, value interface{})
VbSettings(version uint32, opcode uint8, handlerID []byte, key interface{}, value interface{})
LifeCycleOp(version uint32, opcode uint8, handlerID []byte)
SendControlMessage(version uint32, cmd Command, opcode uint8, handlerID []byte, key, value interface{})
GetStats(version uint32, opcode uint8, handlerID []byte)
WriteDcpMessage(version uint32, buffer *bytes.Buffer, opcode uint8, workerID uint8,
instanceID []byte, msg *dcpMessage.DcpEvent, internalInfo *checkpointManager.ParsedInternalDetails) int32
FlushMessage(version uint32, buffer *bytes.Buffer)
GetProcessDetails() ProcessDetails
GetRuntimeStats() common.StatsInterface
StopProcess()
}
ProcessManager will spawn c++ process This will also take care of sending messages to c++ side Response for the process is sent in the response channel
func NewProcessManager ¶
func NewProcessManager(pc ProcessConfig, serverConfig serverConfig.SystemConfig) ProcessManager
Source Files
¶
Click to show internal directories.
Click to hide internal directories.