micro

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 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 DashboardClient

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

func NewDashboardClient

func NewDashboardClient(envs map[string]string) DashboardClient

func (DashboardClient) Call

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

func (DashboardClient) GetService

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

func (DashboardClient) ListEnvs

func (c DashboardClient) ListEnvs() []string

func (DashboardClient) ListServices

func (c DashboardClient) ListServices(env string) ([]*registry.Service, 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)

Jump to

Keyboard shortcuts

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