service

package
v2.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExpiredUpdatesChecker added in v2.21.3

func NewExpiredUpdatesChecker(cleanUpExpiredUpdates string, withSeconds bool, onCheckTimeout func()) (gocron.Scheduler, error)

Types

type APIsConfig

type APIsConfig struct {
	GRPC grpcService.Config `yaml:"grpc" json:"grpc"`
	HTTP HTTPConfig         `yaml:"http" json:"http"`
}

Config represent application configuration

func (*APIsConfig) Validate

func (c *APIsConfig) Validate() error

type ClientsConfig

type ClientsConfig struct {
	Storage                storeConfig.Config      `yaml:"storage" json:"storage"`
	OpenTelemetryCollector otelClient.Config       `yaml:"openTelemetryCollector" json:"openTelemetryCollector"`
	EventBus               EventBusConfig          `yaml:"eventBus" json:"eventBus"`
	ResourceAggregate      ResourceAggregateConfig `yaml:"resourceAggregate" json:"resourceAggregate"`
}

func (*ClientsConfig) Validate

func (c *ClientsConfig) Validate() error

type Config

type Config struct {
	HubID   string        `yaml:"hubID" json:"hubId"`
	Log     log.Config    `yaml:"log" json:"log"`
	APIs    APIsConfig    `yaml:"apis" json:"apis"`
	Clients ClientsConfig `yaml:"clients" json:"clients"`
}

func (Config) String

func (c Config) String() string

String return string representation of Config

func (*Config) Validate

func (c *Config) Validate() error

type EventBusConfig

type EventBusConfig struct {
	NATS           natsClient.ConfigSubscriber `yaml:"nats" json:"nats"`
	SubscriptionID string                      `yaml:"subscriptionID" json:"subscriptionID"`
}

func (*EventBusConfig) Validate

func (c *EventBusConfig) Validate() error

type HTTPConfig

type HTTPConfig struct {
	Addr   string            `yaml:"address" json:"address"`
	Server httpServer.Config `yaml:",inline" json:",inline"`
}

func (*HTTPConfig) Validate

func (c *HTTPConfig) Validate() error

type ResourceAggregateConfig added in v2.21.3

type ResourceAggregateConfig struct {
	Connection grpcClient.Config `yaml:"grpc" json:"grpc"`
}

func (*ResourceAggregateConfig) Validate added in v2.21.3

func (c *ResourceAggregateConfig) Validate() error

type ResourceSubscriber

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

func NewResourceSubscriber

func NewResourceSubscriber(ctx context.Context, config natsClient.ConfigSubscriber, subscriptionID string, fileWatcher *fsnotify.Watcher, logger log.Logger, tracerProvider trace.TracerProvider, handler eventbus.Handler) (*ResourceSubscriber, error)

func (*ResourceSubscriber) Close

func (r *ResourceSubscriber) Close() error

type Service

type Service struct {
	*service.Service
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, config Config, fileWatcher *fsnotify.Watcher, logger log.Logger) (*Service, error)

func (*Service) CancelPendingResourceUpdates

func (s *Service) CancelPendingResourceUpdates(ctx context.Context) error

func (*Service) SnippetServiceStore

func (s *Service) SnippetServiceStore() store.Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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