Documentation
¶
Index ¶
- type BridgeDispatcher
- type ConfighubConnector
- type ConnectorOptions
- type FunctionWorkerAdapter
- type NullBridgeWorker
- func (n *NullBridgeWorker) Apply(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
- func (n *NullBridgeWorker) Destroy(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
- func (n *NullBridgeWorker) Finalize(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
- func (n *NullBridgeWorker) ID() api.BridgeWorkerID
- func (n *NullBridgeWorker) Import(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
- func (n *NullBridgeWorker) Info(opts api.InfoOptions) api.BridgeWorkerInfo
- func (n *NullBridgeWorker) Refresh(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeDispatcher ¶
type BridgeDispatcher struct {
// contains filtered or unexported fields
}
func NewBridgeDispatcher ¶
func NewBridgeDispatcher() BridgeDispatcher
NewBridgeDispatcher creates a new worker.BridgeDispatcher (different from impl.BridgeDispatcher) which is currently only used in the connector. The reason is to experiment with a simplifying wrapper layer over the existing implementation.
func (*BridgeDispatcher) RegisterBridge ¶
func (b *BridgeDispatcher) RegisterBridge(bridge api.Bridge)
RegisterBridge registers a bridge with the dispatcher. It is simpler and more clear than the existing RegisterWorker method on impl.BridgeDispatcher.
type ConfighubConnector ¶
type ConfighubConnector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
func NewConnector(opts ConnectorOptions) (*ConfighubConnector, error)
NewConnector creates a new ConfighubConnector. WorkerID and WorkerSecret are required. The rest of the configuration is loaded from ConfigHub after the worker connects.
func (*ConfighubConnector) Start ¶
func (c *ConfighubConnector) Start() error
Start starts the worker. It opens a persistent connection to ConfigHub and starts performing work based on its configuration.
type ConnectorOptions ¶
type ConnectorOptions struct {
WorkerID string
WorkerSecret string
ConfigHubURL string
FunctionExecutor *function.FunctionExecutor
BridgeDispatcher *BridgeDispatcher
}
type FunctionWorkerAdapter ¶
type FunctionWorkerAdapter struct {
// contains filtered or unexported fields
}
func (*FunctionWorkerAdapter) Info ¶
func (a *FunctionWorkerAdapter) Info() api.FunctionWorkerInfo
func (*FunctionWorkerAdapter) Invoke ¶
func (a *FunctionWorkerAdapter) Invoke(workerCtx api.FunctionWorkerContext, request funcApi.FunctionInvocationRequest) (funcApi.FunctionInvocationResponse, error)
type NullBridgeWorker ¶
type NullBridgeWorker struct{}
func (*NullBridgeWorker) Apply ¶
func (n *NullBridgeWorker) Apply(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
func (*NullBridgeWorker) Destroy ¶
func (n *NullBridgeWorker) Destroy(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
func (*NullBridgeWorker) Finalize ¶
func (n *NullBridgeWorker) Finalize(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
func (*NullBridgeWorker) ID ¶ added in v0.1.1
func (n *NullBridgeWorker) ID() api.BridgeWorkerID
func (*NullBridgeWorker) Import ¶
func (n *NullBridgeWorker) Import(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error
func (*NullBridgeWorker) Info ¶
func (n *NullBridgeWorker) Info(opts api.InfoOptions) api.BridgeWorkerInfo
func (*NullBridgeWorker) Refresh ¶
func (n *NullBridgeWorker) Refresh(wctx api.BridgeWorkerContext, payload api.BridgeWorkerPayload) error