go-platform: github.com/micro/go-platform/discovery Index | Files | Directories

package discovery

import "github.com/micro/go-platform/discovery"

Package discovery is an interface for scalable service discovery.

Index

Package Files

context.go discovery.go options.go os.go util.go watcher.go

Constants

const (
    HeartbeatTopic = "micro.discovery.heartbeat"
)

func Client Uses

func Client(c client.Client) registry.Option

Client used to call the discovery service

func Interval Uses

func Interval(i time.Duration) registry.Option

Interval on which to publish heartbeats

func NewContext Uses

func NewContext(ctx context.Context, c Discovery) context.Context

func NewRegistry Uses

func NewRegistry(opts ...registry.Option) registry.Registry

type Discovery Uses

type Discovery interface {
    Close() error
    registry.Registry
}

Discovery builds on the registry for heartbeating and client side caching

func FromContext Uses

func FromContext(ctx context.Context) (Discovery, bool)

func NewDiscovery Uses

func NewDiscovery(opts ...registry.Option) Discovery

type Options Uses

type Options struct {
    Client   client.Client
    Interval time.Duration
}

Options holds discovery options stored in registry Options context

Directories

PathSynopsis
protoPackage go_micro_os_discovery is a generated protocol buffer package.

Package discovery imports 8 packages (graph) and is imported by 3 packages. Updated 2018-02-20. Refresh now. Tools for package owners.