micro

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: GPL-3.0 Imports: 12 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(
		ProviderTest,
		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"`
	BillingVersion         string `default:"latest"`
	BillingFallbackVersion 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 ProviderTest

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

ProviderTest

func (*Micro) Client

func (m *Micro) Client(serviceVersion, fallback string) client.Client

Client

Jump to

Keyboard shortcuts

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