ellie

package module
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 14 Imported by: 1

README

ellie

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, info AppInfo) context.Context

Types

type App

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

func New

func New(opts ...Option) *App

func (*App) Endpoints

func (app *App) Endpoints() []string

func (*App) ID

func (app *App) ID() string

func (*App) Metadata

func (app *App) Metadata() map[string]string

func (*App) Name

func (app *App) Name() string

func (*App) Run

func (app *App) Run() error

func (*App) Stop

func (app *App) Stop() error

func (*App) Version

func (app *App) Version() string

type AppInfo

type AppInfo interface {
	ID() string
	Name() string
	Version() string
	Metadata() map[string]string
	Endpoints() []string
}

func FromContext

func FromContext(ctx context.Context) (AppInfo, bool)

type Option

type Option func(opts *options)

func AfterStart

func AfterStart(fn func(context.Context) error) Option

func AfterStop

func AfterStop(fn func(context.Context) error) Option

func BeforeStart

func BeforeStart(fn func(context.Context) error) Option

func BeforeStop

func BeforeStop(fn func(context.Context) error) Option

func Context

func Context(ctx context.Context) Option

func Endpoints

func Endpoints(endpoints ...*url.URL) Option

func ID

func ID(id string) Option

func Logger

func Logger(logger log.LogWriter) Option

func Metadata

func Metadata(metadata map[string]string) Option

func Name

func Name(name string) Option

func Registrar

func Registrar(r registry.Registrar) Option

func RegistrarTimeout

func RegistrarTimeout(timeout time.Duration) Option

func Server

func Server(servers ...transport.Server) Option

func Signal

func Signal(sigs ...os.Signal) Option

func StopTimeout

func StopTimeout(timeout time.Duration) Option

func Tracer added in v0.3.9

func Tracer(tracer trace.TracerProvider) Option

func Version

func Version(version string) Option

Jump to

Keyboard shortcuts

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