wci

package
v1.32.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT, MIT Imports: 27 Imported by: 0

Documentation

Overview

Package wci contains the implementation for the worker controller instances

Index

Constants

View Source
const (
	ServiceName primitives.ServiceName = "worker-controller-workers"

	// ServiceType is the number identification for the service in the DB
	// this needs to be distinct from the values already defined in the
	// persisttence package, so jumping a bit up to 10.
	ServiceType persistence.ServiceType = 10
)

Variables

Functions

func PerNamespaceWorkerManagerProvider

func PerNamespaceWorkerManagerProvider(
	logger log.Logger,
	sdkClientFactory sdk.ClientFactory,
	namespaceRegistry namespace.Registry,
	hostName resource.HostName,
	config *worker.Config,
	clusterMetadata cluster.Metadata,
	dynamicConfig *dynamicconfig.Collection,
) *worker.PerNamespaceWorkerManager

func ServiceLifetimeHooks

func ServiceLifetimeHooks(lc fx.Lifecycle, svc *Service)

func ServiceResolverProvider

func ServiceResolverProvider(
	membershipMonitor membership.Monitor,
) (membership.ServiceResolver, error)

func ThrottledLoggerRpsFnProvider

func ThrottledLoggerRpsFnProvider(serviceConfig *worker.Config) resource.ThrottledLoggerRpsFn

func WorkerConfigProvider

func WorkerConfigProvider(config *Config) *worker.Config

Types

type Config

type Config struct {
	worker.Config

	PerNamespaceMaxWorkerControllerInstances            dynamicconfig.TypedPropertyFnWithNamespaceFilter[int]
	PerNamespaceWorkerControllerInstanceWorkflowVersion dynamicconfig.TypedPropertyFnWithNamespaceFilter[int]
}

Config contains all the service config for worker

func ConfigProvider

func ConfigProvider(
	dc *dynamicconfig.Collection,
	persistenceConfig *config.Persistence,
) *Config

func NewConfig

func NewConfig(
	dc *dynamicconfig.Collection,
	persistenceConfig *config.Persistence,
) *Config

NewConfig builds the new Config for worker service

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	logger log.SnTaggedLogger,
	serviceConfig *Config,
	sdkClientFactory sdk.ClientFactory,
	clusterMetadata cluster.Metadata,
	namespaceRegistry namespace.Registry,
	membershipMonitor membership.Monitor,
	hostInfoProvider membership.HostInfoProvider,
	metricsHandler metrics.Handler,
	metadataManager persistence.MetadataManager,
	perNamespaceWorkerManager *worker.PerNamespaceWorkerManager,
) (*Service, error)

func (*Service) Start

func (s *Service) Start()

func (*Service) Stop

func (s *Service) Stop()

Stop is called to stop the service

Directories

Path Synopsis
Package client contains the client to interact with Worker Controller Instance workflows
Package client contains the client to interact with Worker Controller Instance workflows
Package workflow contains the actual workflow of a worker controller instance
Package workflow contains the actual workflow of a worker controller instance
compute_provider
Package computeprovider contains the implementations of the various compute providers
Package computeprovider contains the implementations of the various compute providers
iface
Package iface contains the interface definitions to interact with the WCI workflows these are internal to the project.
Package iface contains the interface definitions to interact with the WCI workflows these are internal to the project.
scaling_algorithm
Package scalingalgorithm contains the different scaling algorithms available for WCIs
Package scalingalgorithm contains the different scaling algorithms available for WCIs

Jump to

Keyboard shortcuts

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