micro

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Prefix           = "pkg.micro"
	UnmarshalKey     = "micro"
	UnmarshalKeyBind = "micro.bind"
)

Variables

View Source
var (
	WireSet = wire.NewSet(
		Provider,
		Cfg,
	)
	WireTestSet = wire.NewSet(
		Provider,
		CfgTest,
	)
)

Functions

func NewLoggerAdapter

func NewLoggerAdapter(log logger.Logger, lvl logger.Level) logIface.Logger

NewLoggerAdapter

Types

type Config

type Config struct {
	Debug    bool `fallback:"shared.debug"`
	Name     string
	Version  string `default:"latest"`
	Selector string
	Bind     string
	// contains filtered or unexported fields
}

Config

func Cfg

func Cfg(cfg config.Configurator) (*Config, func(), error)

Cfg

func CfgTest

func CfgTest() (*Config, func(), error)

CfgTest

func (*Config) OnReload

func (c *Config) OnReload(callback func(ctx context.Context))

OnReload

func (*Config) Reload

func (c *Config) Reload(ctx context.Context)

Reload

type Micro

type Micro struct {
	provider.LMT
	// contains filtered or unexported fields
}

Micro

func New

func New(ctx context.Context, set provider.AwareSet, cfg *Config) *Micro

New

func Provider

func Provider(ctx context.Context, set provider.AwareSet, cfg *Config) (*Micro, func(), error)

Provider

func (*Micro) Client

func (m *Micro) Client() client.Client

Client

func (*Micro) ListenAndServe

func (m *Micro) ListenAndServe() (err error)

ListenAndServe

func (*Micro) Server

func (m *Micro) Server() server.Server

Server

Jump to

Keyboard shortcuts

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