application

package
v0.0.0-...-505e429 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, s Info) context.Context

Types

type App

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

func New

func New(opts ...Option) *App

func (*App) ID

func (a *App) ID() string

func (*App) Metadata

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

func (*App) Name

func (a *App) Name() string

func (*App) Run

func (a *App) Run() error

func (*App) Stop

func (a *App) Stop() error

func (*App) Version

func (a *App) Version() string

type Info

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

type Option

type Option func(o *options)

func ID

func ID(id string) Option

func Logger

func Logger(logger log.Logger) Option

func Metadata

func Metadata(md map[string]string) Option

func Name

func Name(name string) Option

func Server

func Server(srv ...transport.Server) 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