Documentation ¶
Index ¶
- Variables
- func ConnectorIDFromContext(ctx context.Context) string
- func ContextWithConnectorID(ctx context.Context, connectorID string) context.Context
- func ContextWithLogLevel(ctx context.Context, logLevel string) context.Context
- func Enrich(ctx context.Context, cfg pconnector.PluginConfig) context.Context
- func InitStandaloneConnectorUtilities(target string) error
- func LogLevelFromContext(ctx context.Context) string
- type BatchFn
- type BatchResult
- type Batcher
- type ConnectorState
- type ConnectorStateWatcher
- type DoWithLockOptions
- type EnqueueStatus
- type StandaloneConnectorUtility
Constants ¶
This section is empty.
Variables ¶
View Source
var StandaloneConnectorUtilities []StandaloneConnectorUtility
Functions ¶
func ConnectorIDFromContext ¶ added in v0.10.0
ConnectorIDFromContext fetches the connector ID from the context. If the context does not contain a connector ID it returns an empty string.
func ContextWithConnectorID ¶ added in v0.10.0
ContextWithConnectorID wraps ctx and returns a context that contains the connector ID.
func ContextWithLogLevel ¶ added in v0.10.0
ContextWithLogLevel wraps ctx and returns a context that contains the connector LogLevel.
func Enrich ¶ added in v0.10.0
func Enrich(ctx context.Context, cfg pconnector.PluginConfig) context.Context
func InitStandaloneConnectorUtilities ¶ added in v0.10.0
func LogLevelFromContext ¶ added in v0.10.0
LogLevelFromContext fetches the connector LogLevel from the context. If the context does not contain a connector LogLevel it returns an empty string.
Types ¶
type Batcher ¶ added in v0.7.2
type Batcher[T any] struct { // contains filtered or unexported fields }
func NewBatcher ¶ added in v0.7.2
func (*Batcher[T]) Enqueue ¶ added in v0.7.2
func (b *Batcher[T]) Enqueue(item T, size int) EnqueueStatus
func (*Batcher[T]) Results ¶ added in v0.7.2
func (b *Batcher[T]) Results() <-chan BatchResult
type ConnectorState ¶ added in v0.8.0
type ConnectorState int
const ( StateInitial ConnectorState = iota StateConfiguring StateConfigured StateStarting StateStarted StateInitiatingRun StateRunning StateInitiatingStop StateStopping StateStopped StateTearingDown StateTornDown StateErrored ConnectorState = 500 )
func (ConnectorState) String ¶ added in v0.8.0
func (i ConnectorState) String() string
type ConnectorStateWatcher ¶ added in v0.8.0
type ConnectorStateWatcher csync.ValueWatcher[ConnectorState]
func (*ConnectorStateWatcher) DoWithLock ¶ added in v0.8.0
func (w *ConnectorStateWatcher) DoWithLock( ctx context.Context, opts DoWithLockOptions, f func(currentState ConnectorState) error, ) error
func (*ConnectorStateWatcher) Set ¶ added in v0.8.0
func (w *ConnectorStateWatcher) Set(newState ConnectorState) bool
type DoWithLockOptions ¶ added in v0.8.0
type DoWithLockOptions struct { ExpectedStates []ConnectorState StateBefore ConnectorState StateAfter ConnectorState WaitForExpectedState bool }
type EnqueueStatus ¶ added in v0.7.2
type EnqueueStatus int
const ( Scheduled EnqueueStatus = iota + 1 Flushed )
type StandaloneConnectorUtility ¶ added in v0.10.0
type StandaloneConnectorUtility interface {
Init(conn *grpc.ClientConn) error
}
Click to show internal directories.
Click to hide internal directories.