Help us shape the future of Go! Take the 2026 Go Developer Survey

service

package
v1.12.4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register[Options any](registry *Registry, outboundType string, constructor ConstructorFunc[Options])

Types

type Adapter

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

func NewAdapter

func NewAdapter(serviceType string, serviceTag string) Adapter

func (*Adapter) Tag

func (a *Adapter) Tag() string

func (*Adapter) Type

func (a *Adapter) Type() string

type ConstructorFunc

type ConstructorFunc[T any] func(ctx context.Context, logger log.ContextLogger, tag string, options T) (adapter.Service, error)

type Manager

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

func NewManager

func NewManager(logger log.ContextLogger, registry adapter.ServiceRegistry) *Manager

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, logger log.ContextLogger, tag string, serviceType string, options any) error

func (*Manager) Get

func (m *Manager) Get(tag string) (adapter.Service, bool)

func (*Manager) Remove

func (m *Manager) Remove(tag string) error

func (*Manager) Services

func (m *Manager) Services() []adapter.Service

func (*Manager) Start

func (m *Manager) Start(stage adapter.StartStage) error

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Create

func (m *Registry) Create(ctx context.Context, logger log.ContextLogger, tag string, outboundType string, options any) (adapter.Service, error)

func (*Registry) CreateOptions

func (m *Registry) CreateOptions(outboundType string) (any, bool)

Jump to

Keyboard shortcuts

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