Documentation
¶
Index ¶
- Variables
- type AbstractEventSource
- func (aes *AbstractEventSource) AllocateWorkerAndSubmitEvent(event nuclio.Event, functionLogger nuclio.Logger, timeout time.Duration) (response interface{}, submitError error, processError error)
- func (aes *AbstractEventSource) AllocateWorkerAndSubmitEvents(events []nuclio.Event, functionLogger nuclio.Logger, timeout time.Duration) (responses []interface{}, submitError error, processErrors []error)
- func (aes *AbstractEventSource) GetClass() string
- func (aes *AbstractEventSource) GetID() string
- func (aes *AbstractEventSource) GetKind() string
- func (aes *AbstractEventSource) GetStatistics() *Statistics
- func (aes *AbstractEventSource) GetWorkers() []*worker.Worker
- func (aes *AbstractEventSource) SubmitEventToWorker(functionLogger nuclio.Logger, workerInstance *worker.Worker, ...) (response interface{}, processError error)
- type Checkpoint
- type Configuration
- type Creator
- type EventSource
- type Registry
- type Statistics
Constants ¶
This section is empty.
Variables ¶
View Source
var RegistrySingleton = Registry{ Registry: *registry.NewRegistry("event_source"), }
global singleton
Functions ¶
This section is empty.
Types ¶
type AbstractEventSource ¶
type AbstractEventSource struct {
ID string
Logger nuclio.Logger
WorkerAllocator worker.Allocator
Class string
Kind string
Statistics Statistics
}
func (*AbstractEventSource) AllocateWorkerAndSubmitEvent ¶
func (*AbstractEventSource) AllocateWorkerAndSubmitEvents ¶
func (*AbstractEventSource) GetClass ¶
func (aes *AbstractEventSource) GetClass() string
func (*AbstractEventSource) GetID ¶
func (aes *AbstractEventSource) GetID() string
get user given ID for this event source
func (*AbstractEventSource) GetKind ¶
func (aes *AbstractEventSource) GetKind() string
func (*AbstractEventSource) GetStatistics ¶
func (aes *AbstractEventSource) GetStatistics() *Statistics
get statistics
func (*AbstractEventSource) GetWorkers ¶
func (aes *AbstractEventSource) GetWorkers() []*worker.Worker
func (*AbstractEventSource) SubmitEventToWorker ¶
type Checkpoint ¶
type Checkpoint *string
type Configuration ¶
type Configuration struct {
ID string
}
func NewConfiguration ¶
func NewConfiguration(configuration *viper.Viper) *Configuration
type EventSource ¶
type EventSource interface {
// start creating events from a given checkpoint (nil - no checkpoint)
Start(checkpoint Checkpoint) error
// stop creating events. returns the current checkpoint
Stop(force bool) (Checkpoint, error)
// get the user given ID for this event source
GetID() string
// get the class of source (sync, async, etc)
GetClass() string
// get specific kind of source (http, rabbit mq, etc)
GetKind() string
// get the configuration
GetConfig() map[string]interface{}
// get statistics
GetStatistics() *Statistics
// get direct access to workers for things like housekeeping / management
// TODO: locks and such when relevant
GetWorkers() []*worker.Worker
}
type Statistics ¶
func (*Statistics) DiffFrom ¶
func (s *Statistics) DiffFrom(prev *Statistics) Statistics
Click to show internal directories.
Click to hide internal directories.