worker

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 lib.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 lib.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 executor.FunctionExecutor
	BridgeDispatcher *BridgeDispatcher
}

type NullBridgeWorker

type NullBridgeWorker struct{}

func (*NullBridgeWorker) Apply

func (*NullBridgeWorker) Destroy

func (*NullBridgeWorker) Finalize

func (*NullBridgeWorker) ID

func (*NullBridgeWorker) Import

func (*NullBridgeWorker) Info

func (*NullBridgeWorker) Refresh

Directories

Path Synopsis
This file defines a set of experimental aliases for the purpose of getting a feel for the best naming conventions for the SDK.
This file defines a set of experimental aliases for the purpose of getting a feel for the best naming conventions for the SDK.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL