api

package
v0.0.0-...-55528cd Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelFunc

type CancelFunc context.CancelFunc

A CancelFunc tells an operation to abandon its work.

type Discoverer

type Discoverer interface {
	Register(namespace, name, addr string, timeout time.Duration) (KeepAliveFunc, error)
	Unregister(namespace, name string) error
	Watch(namespace string) (<-chan *Event, CancelFunc, error)
	Services(namespace string) (map[string]string, error)
	Version() int
	Close() error
}

Discoverer interface

type Event

type Event struct {
	Action string
	Name   string
	Addr   string
}

Event desc service status change Action:

v2 - create set update expire delete
v3 - put delete

type KeepAliveFunc

type KeepAliveFunc func() error

KeepAliveFunc need to execute on timer

Jump to

Keyboard shortcuts

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