micro

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const EnvLocal = "local"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListEnvs() []string
	ListServices(env string) ([]*registry.Service, error)
	GetService(env, name string) (*registry.Service, error)
	Call(ctx context.Context, env, service, endpoint string, body map[string]interface{}, resp *json.RawMessage) error
}

type LocalClient

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

func NewLocalClient

func NewLocalClient(microClient client.Client, microRegistry registry.Registry, requestTimeout time.Duration) LocalClient

func (LocalClient) Call

func (c LocalClient) Call(ctx context.Context, env, service, endpoint string, body map[string]interface{}, response *json.RawMessage) error

func (LocalClient) GetService

func (c LocalClient) GetService(env, name string) (*registry.Service, error)

func (LocalClient) ListEnvs

func (c LocalClient) ListEnvs() []string

func (LocalClient) ListServices

func (c LocalClient) ListServices(env string) ([]*registry.Service, error)

type WebClient added in v1.2.0

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

func NewWebClient added in v1.2.0

func NewWebClient(envs map[string]string) WebClient

func (WebClient) Call added in v1.2.0

func (c WebClient) Call(ctx context.Context, env, service, endpoint string, body map[string]interface{}, response *json.RawMessage) error

func (WebClient) GetService added in v1.2.0

func (c WebClient) GetService(env, name string) (*registry.Service, error)

func (WebClient) ListEnvs added in v1.2.0

func (c WebClient) ListEnvs() []string

func (WebClient) ListServices added in v1.2.0

func (c WebClient) ListServices(env string) ([]*registry.Service, error)

Jump to

Keyboard shortcuts

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