bootstrap

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCoreDialOptionsFromEnv

func BuildCoreDialOptionsFromEnv(ctx context.Context, role models.ServiceRole, log logger.Logger) ([]grpc.DialOption, func(), error)

BuildCoreDialOptionsFromEnv constructs gRPC dial options for reaching the core service using the SPIFFE or mTLS settings provided via environment variables. It returns a closer function that callers should invoke to release any underlying security provider.

func CoreSecurityProviderFromEnv

func CoreSecurityProviderFromEnv(ctx context.Context, role models.ServiceRole, log logger.Logger) (coregrpc.SecurityProvider, error)

CoreSecurityProviderFromEnv returns a security provider initialized from CORE_* env vars.

Types

type Result

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

Result contains helpers returned from Service.

func Service

func Service(ctx context.Context, desc config.ServiceDescriptor, cfg interface{}, opts ServiceOptions) (*Result, error)

Service loads configuration for a managed service (file + optional pinned overlay).

func ServiceWithTemplateRegistration

func ServiceWithTemplateRegistration(
	ctx context.Context,
	desc config.ServiceDescriptor,
	cfg interface{},
	templateData []byte,
	opts ServiceOptions,
) (*Result, error)

ServiceWithTemplateRegistration is a convenience function that combines Service() with template registration to core for tooling that needs default config templates.

func (*Result) Close

func (r *Result) Close() error

Close is a no-op now that KV-managed config is removed.

func (*Result) SetInstanceID

func (r *Result) SetInstanceID(id string)

SetInstanceID overrides the identifier associated with watcher telemetry (unused now).

func (*Result) StartWatch

func (r *Result) StartWatch(_ context.Context, _ logger.Logger, _ interface{}, _ func())

StartWatch is a no-op now that KV-managed config is removed.

type ServiceOptions

type ServiceOptions struct {
	Role         models.ServiceRole
	ConfigPath   string
	Logger       logger.Logger
	OnReload     func()
	DisableWatch bool
	InstanceID   string
	KeyContext   config.KeyContext
	KeyContextFn func(cfg interface{}) config.KeyContext
}

ServiceOptions controls how a service configuration is loaded.

Jump to

Keyboard shortcuts

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