micro

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Prefix       = "micro.service"
	UnmarshalKey = "micro"
)

Variables

This section is empty.

Functions

This section is empty.

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"`
	RecurringVersion         string `default:"latest"`
	RecurringFallbackVersion string `default:"latest"`
	Selector                 string
	Bind                     string
	// contains filtered or unexported fields
}

func Cfg

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

func (*Config) OnReload

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

func (*Config) Reload

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

type Micro

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

func New

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

func Provider

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

func ProviderTest

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

func (*Micro) Client

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

Jump to

Keyboard shortcuts

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