service

package
v0.0.0-...-0174093 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func NewCore

func NewCore(name string, id string, logger *slog.Logger) Core

func (Core) ID

func (core Core) ID() string

func (Core) Logger

func (core Core) Logger() *slog.Logger

func (Core) Name

func (core Core) Name() string

func (Core) Run

func (core Core) Run(ctx context.Context) error

type Deployer

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

func NewDeployer

func NewDeployer() *Deployer

func (*Deployer) Add

func (deployer *Deployer) Add(service Service, middlewares ...Middleware) *Deployer

func (*Deployer) Deploy

func (deployer *Deployer) Deploy(ctx context.Context) error

type Middleware

type Middleware interface {
	BeforeRun(ctx context.Context, g *errgroup.Group, service Service)
}

type Service

type Service interface {
	Run(ctx context.Context) error
	Logger() *slog.Logger
	ID() string
	Name() string
}

Jump to

Keyboard shortcuts

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