announce

package
v0.0.0-...-27a864e Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Defaults for Announce.
	DefaultEndpoint = "http://127.0.0.1:63412"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Announce

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

func New

func New(app string, options ...OptionFunc) (*Announce, error)

New creates a new Announce.

func (*Announce) Announce

func (a *Announce) Announce(i *api.Instance, ttl time.Duration) error

Announce registers a single instance. Set TTL to disable

type OptionFunc

type OptionFunc func(*Announce) error

func Endpoint

func Endpoint(endpoint string) OptionFunc

Endpoint sets the API endpoint.

func HTTPClient

func HTTPClient(client *http.Client) OptionFunc

HTTPClient sets the http client to use

Jump to

Keyboard shortcuts

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