Documentation ¶
Index ¶
- type Producer
- func (p *Producer) AddMetadataPrefix(key string) common.Key
- func (p *Producer) AggregateCurlStats(in interface{}, curlMap map[string]float64)
- func (p *Producer) AppendCurlLatencyStats(deltas common.StatsData)
- func (p *Producer) AppendLatencyStats(deltas common.StatsData)
- func (p *Producer) BootstrapStatus() bool
- func (p *Producer) CfgData() string
- func (p *Producer) CheckpointBlobDump() map[string]interface{}
- func (p *Producer) CleanupMetadataBucket(skipCheckpointBlobs bool) error
- func (p *Producer) CleanupUDSs()
- func (p *Producer) ClearEventStats()
- func (p *Producer) DcpFeedBoundary() string
- func (p *Producer) FunctionManageBucket() string
- func (p *Producer) FunctionManageScope() string
- func (p *Producer) GetAppCode() string
- func (p *Producer) GetAppLog(sz int64) []string
- func (p *Producer) GetCurlLatencyStats() common.StatsData
- func (p *Producer) GetCursorAware() bool
- func (p *Producer) GetDcpEventsRemainingToProcess() uint64
- func (p *Producer) GetDebuggerToken() string
- func (p *Producer) GetDebuggerURL() (string, error)
- func (p *Producer) GetEventProcessingStats() map[string]uint64
- func (p *Producer) GetEventingConsumerPids() map[string]int
- func (p *Producer) GetExecutionStats() map[string]interface{}
- func (p *Producer) GetFailureStats() map[string]interface{}
- func (p *Producer) GetFuncScopeDetails() (string, uint32)
- func (p *Producer) GetFunctionInstanceId() string
- func (p *Producer) GetInsight() *common.Insight
- func (p *Producer) GetLatencyStats() common.StatsData
- func (p *Producer) GetLcbExceptionsStats() map[string]uint64
- func (p *Producer) GetMetaStoreStats() map[string]uint64
- func (p *Producer) GetMetadataKeyspaceID() (common.KeyspaceID, bool)
- func (p *Producer) GetMetadataPrefix() string
- func (p *Producer) GetNsServerPort() string
- func (p *Producer) GetOwner() *common.Owner
- func (p *Producer) GetSeqsProcessed() map[int]int64
- func (p *Producer) GetSourceKeyspaceID() (common.KeyspaceID, bool)
- func (p *Producer) GetVbOwner(vb uint16) (string, string, error)
- func (p *Producer) InternalVbDistributionStats() map[string]string
- func (p *Producer) IsEventingNodeAlive(eventingHostPortAddr, nodeUUID string) bool
- func (p *Producer) IsPlannerRunning() bool
- func (p *Producer) IsTrapEvent() bool
- func (p *Producer) KillAllConsumers()
- func (p *Producer) KillAndRespawnEventingConsumer(c common.EventingConsumer)
- func (p *Producer) KvHostPorts() []string
- func (p *Producer) LenRunningConsumers() int
- func (p *Producer) MetadataBucket() string
- func (p *Producer) MetadataCollection() string
- func (p *Producer) MetadataScope() string
- func (p *Producer) NotifyInit()
- func (p *Producer) NotifyPrepareTopologyChange(ejectNodes, keepNodes []string, changeType service.TopologyChangeType)
- func (p *Producer) NotifySettingsChange()
- func (p *Producer) NotifySupervisor()
- func (p *Producer) NotifyTopologyChange(msg *common.TopologyChangeMsg)
- func (p *Producer) NsServerHostPort() string
- func (p *Producer) NsServerNodeCount() int
- func (p *Producer) PauseProducer()
- func (p *Producer) PlannerStats() []*common.PlannerNodeVbMapping
- func (p *Producer) RebalanceStatus() bool
- func (p *Producer) RebalanceTaskProgress() *common.RebalanceProgress
- func (p *Producer) RemoveConsumerToken(workerName string)
- func (p *Producer) ResetCounters()
- func (p *Producer) ResumeProducer()
- func (p *Producer) Serve()
- func (p *Producer) SetFeatureMatrix(featureMatrix uint32)
- func (p *Producer) SetRetryCount(retryCount int64)
- func (p *Producer) SetTrapEvent(value bool)
- func (p *Producer) SignalBootstrapFinish()
- func (p *Producer) SignalStartDebugger(token string) error
- func (p *Producer) SignalStopDebugger() error
- func (p *Producer) SourceBucket() string
- func (p *Producer) SourceCollection() string
- func (p *Producer) SourceScope() string
- func (p *Producer) SpanBlobDump() map[string]interface{}
- func (p *Producer) SrcMutation() bool
- func (p *Producer) Stop(context string)
- func (p *Producer) StopRunningConsumers()
- func (p *Producer) String() string
- func (p *Producer) TimerDebugStats() map[int]map[string]interface{}
- func (p *Producer) UndeployHandler(msg common.UndeployAction)
- func (p *Producer) UpdateEncryptionLevel(enforceTLS, encryptOn bool)
- func (p *Producer) UpdateMemoryQuota(quota int64)
- func (p *Producer) UsingTimer() bool
- func (p *Producer) VbDcpEventsRemainingToProcess() map[int]int64
- func (p *Producer) VbDistributionStatsFromMetadata() map[string]map[string]string
- func (p *Producer) VbSeqnoStats() map[int][]map[string]interface{}
- func (p *Producer) WriteAppLog(log string)
- func (p *Producer) WriteDebuggerToken(token string, hostnames []string) error
- func (p *Producer) WriteDebuggerURL(url string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Producer ¶
type Producer struct { MemoryQuota int64 // contains filtered or unexported fields }
Producer handle - one instance per app per eventing node
func NewProducer ¶
func NewProducer(appName, debuggerPort, eventingPort, eventingSSLPort, eventingDir, kvPort, metakvAppHostPortsPath, nsServerPort, uuid, diagDir string, memoryQuota int64, featureMatrix uint32, superSup common.EventingSuperSup, cursorRegistry common.CursorRegistryMgr) *Producer
NewProducer creates a new producer instance using parameters supplied by super_supervisor
func (*Producer) AddMetadataPrefix ¶
AddMetadataPrefix prepends user prefix and handler UUID to namespacing within metadata bucket
func (*Producer) AggregateCurlStats ¶
func (*Producer) AppendCurlLatencyStats ¶
func (*Producer) AppendLatencyStats ¶
func (*Producer) BootstrapStatus ¶
BootstrapStatus returns state of bootstrap for all running consumer instances
func (*Producer) CheckpointBlobDump ¶
CheckpointBlobDump returns state of metadata blobs stored in Couchbase bucket
func (*Producer) CleanupMetadataBucket ¶
CleanupMetadataBucket clears up all application related artifacts from metadata bucket post undeploy
func (*Producer) CleanupUDSs ¶
func (p *Producer) CleanupUDSs()
CleanupUDSs clears up UDS created for communication between Go and eventing-consumer
func (*Producer) ClearEventStats ¶
func (p *Producer) ClearEventStats()
ClearEventStats flushes event processing stats
func (*Producer) DcpFeedBoundary ¶
DcpFeedBoundary returns feed boundary used for vb dcp streams
func (*Producer) FunctionManageBucket ¶
func (*Producer) FunctionManageScope ¶
func (*Producer) GetAppCode ¶
GetAppCode returns handler code for the current app
func (*Producer) GetCurlLatencyStats ¶
func (*Producer) GetCursorAware ¶
func (*Producer) GetDcpEventsRemainingToProcess ¶
GetDcpEventsRemainingToProcess returns remaining dcp events to process
func (*Producer) GetDebuggerToken ¶
GetDebuggerToken returns debug token
func (*Producer) GetDebuggerURL ¶
GetDebuggerURL returns V8 Debugger url
func (*Producer) GetEventProcessingStats ¶
GetEventProcessingStats exposes dcp/timer processing stats
func (*Producer) GetEventingConsumerPids ¶
GetEventingConsumerPids returns map of Eventing.Consumer worker name and it's os pid
func (*Producer) GetExecutionStats ¶
GetExecutionStats returns execution stats aggregated from Eventing.Consumer instances
func (*Producer) GetFailureStats ¶
GetFailureStats returns failure stats aggregated from Eventing.Consumer instances
func (*Producer) GetFuncScopeDetails ¶
func (*Producer) GetFunctionInstanceId ¶
func (*Producer) GetInsight ¶
func (*Producer) GetLatencyStats ¶
GetLatencyStats returns latency stats for event handlers from from cpp world
func (*Producer) GetLcbExceptionsStats ¶
GetLcbExceptionsStats returns libcouchbase exception stats from CPP workers
func (*Producer) GetMetaStoreStats ¶
GetMetaStoreStats exposes timer store related stat counters
func (*Producer) GetMetadataKeyspaceID ¶
func (p *Producer) GetMetadataKeyspaceID() (common.KeyspaceID, bool)
func (*Producer) GetMetadataPrefix ¶
GetMetadataPrefix returns prefix used for blobs stored in Couchbase bucket
func (*Producer) GetNsServerPort ¶
GetNsServerPort return rest port for ns_server
func (*Producer) GetSeqsProcessed ¶
GetSeqsProcessed returns vbucket specific sequence nos processed so far
func (*Producer) GetSourceKeyspaceID ¶
func (p *Producer) GetSourceKeyspaceID() (common.KeyspaceID, bool)
func (*Producer) GetVbOwner ¶
GetVbOwner returns assigned eventing nodes and worker for a vbucket
func (*Producer) InternalVbDistributionStats ¶
InternalVbDistributionStats returns internal state of vbucket ownership distribution on local eventing node
func (*Producer) IsEventingNodeAlive ¶
IsEventingNodeAlive verifies if a hostPortAddr combination is an active eventing node
func (*Producer) IsPlannerRunning ¶
IsPlannerRunning returns planner execution status
func (*Producer) IsTrapEvent ¶
IsTrapEvent signifies if debugger should trap events
func (*Producer) KillAllConsumers ¶
func (p *Producer) KillAllConsumers()
Last ditch effort to kill all consumers
func (*Producer) KillAndRespawnEventingConsumer ¶
func (p *Producer) KillAndRespawnEventingConsumer(c common.EventingConsumer)
KillAndRespawnEventingConsumer cleans up a dead consumer handle from list of active running consumers
func (*Producer) KvHostPorts ¶
KvHostPorts returns host:port combination for kv service
func (*Producer) LenRunningConsumers ¶
LenRunningConsumers returns the number of actively running consumers for a given app's producer
func (*Producer) MetadataBucket ¶
MetadataBucket return metadata bucket for event handler
func (*Producer) MetadataCollection ¶
func (*Producer) MetadataScope ¶
func (*Producer) NotifyInit ¶
func (p *Producer) NotifyInit()
NotifyInit notifies the supervisor about producer initialisation
func (*Producer) NotifyPrepareTopologyChange ¶
func (p *Producer) NotifyPrepareTopologyChange(ejectNodes, keepNodes []string, changeType service.TopologyChangeType)
NotifyPrepareTopologyChange captures keepNodes supplied as part of topology change message
func (*Producer) NotifySettingsChange ¶
func (p *Producer) NotifySettingsChange()
NotifySettingsChange is called by super_supervisor to notify producer about settings update
func (*Producer) NotifySupervisor ¶
func (p *Producer) NotifySupervisor()
NotifySupervisor notifies the supervisor about clean shutdown of producer
func (*Producer) NotifyTopologyChange ¶
func (p *Producer) NotifyTopologyChange(msg *common.TopologyChangeMsg)
NotifyTopologyChange is used by super_supervisor to notify producer about topology change
func (*Producer) NsServerHostPort ¶
NsServerHostPort returns host:port combination for ns_server instance
func (*Producer) NsServerNodeCount ¶
NsServerNodeCount returns count of currently active ns_server nodes in the cluster
func (*Producer) PauseProducer ¶
func (p *Producer) PauseProducer()
PauseProducer pauses the execution of Eventing.Producer and corresponding Eventing.Consumer instances
func (*Producer) PlannerStats ¶
func (p *Producer) PlannerStats() []*common.PlannerNodeVbMapping
PlannerStats returns vbucket distribution as per planner running on local eventing node for a given app
func (*Producer) RebalanceStatus ¶
RebalanceStatus returns state of rebalance for all running consumer instances
func (*Producer) RebalanceTaskProgress ¶
func (p *Producer) RebalanceTaskProgress() *common.RebalanceProgress
RebalanceTaskProgress reports vbuckets remaining to be transferred as per planner during the course of rebalance
func (*Producer) RemoveConsumerToken ¶
RemoveConsumerToken removes specified worker from supervisor tree
func (*Producer) ResetCounters ¶
func (p *Producer) ResetCounters()
func (*Producer) ResumeProducer ¶
func (p *Producer) ResumeProducer()
ResumeProducer after pausing Before resuming the producer, make sure that gocb handle is registered on the correct pool
func (*Producer) SetFeatureMatrix ¶
func (*Producer) SetRetryCount ¶
SetRetryCount changes the retry count for early bail out from retry ops
func (*Producer) SetTrapEvent ¶
SetTrapEvent flips trap event flag
func (*Producer) SignalBootstrapFinish ¶
func (p *Producer) SignalBootstrapFinish()
SignalBootstrapFinish is leveraged by EventingSuperSup instance to check if app handler has finished bootstrapping
func (*Producer) SignalStartDebugger ¶
SignalStartDebugger sets up necessary flags to signal debugger start
func (*Producer) SignalStopDebugger ¶
SignalStopDebugger signals to stop debugger session
func (*Producer) SourceBucket ¶
SourceBucket returns the source bucket for event handler
func (*Producer) SourceCollection ¶
SourceCollection returns the source collection for event handler
func (*Producer) SourceScope ¶
SourceScope returns the source scope for event handler
func (*Producer) SpanBlobDump ¶
SpanBlobDump returns state of timer span blobs stored in metadata bucket
func (*Producer) SrcMutation ¶
func (*Producer) StopRunningConsumers ¶
func (p *Producer) StopRunningConsumers()
StopRunningConsumers stops all running instances of Eventing.Consumer
func (*Producer) String ¶
Implement fmt.Stringer interface for better debugging in case producer routine crashes and supervisor has to respawn it
func (*Producer) TimerDebugStats ¶
TimerDebugStats captures timer related stats to assist in debugging mismtaches during rebalance
func (*Producer) UndeployHandler ¶
func (p *Producer) UndeployHandler(msg common.UndeployAction)
func (*Producer) UpdateEncryptionLevel ¶
func (*Producer) UpdateMemoryQuota ¶
UpdateMemoryQuota allows tuning of memory quota for Eventing
func (*Producer) UsingTimer ¶
func (*Producer) VbDcpEventsRemainingToProcess ¶
VbDcpEventsRemainingToProcess returns remaining dcp events to process per vbucket
func (*Producer) VbDistributionStatsFromMetadata ¶
VbDistributionStatsFromMetadata dumps the state of vbucket distribution per metadata bucket
func (*Producer) VbSeqnoStats ¶
VbSeqnoStats returns seq no stats, which can be useful in figuring out missed events during rebalance
func (*Producer) WriteAppLog ¶
WriteAppLog dumps the application specific log message to configured file
func (*Producer) WriteDebuggerToken ¶
WriteDebuggerToken stores debugger token into metadata bucket
func (*Producer) WriteDebuggerURL ¶
WriteDebuggerURL stores debugger info in metadata bucket