package naming

import "github.com/theupdateframework/notary/Godeps/_workspace/src/google.golang.org/grpc/naming"

Package naming defines the naming API and related data structures for gRPC. The interface is EXPERIMENTAL and may be suject to change.

Index

Constants

const (
	// Add indicates a new address is added.
	Add = iota
	// Delete indicates an exisiting address is deleted.
	Delete
)

Types

type OP

type OP uint8

OP defines the corresponding operations for a name resolution change.

type Resolver

type Resolver interface {
	// Resolve returns the name resolution results.
	Resolve(target string) ([]*Update, error)
	// NewWatcher creates a Watcher to watch the changes on target.
	NewWatcher(target string) Watcher
}

Resolver does one-shot name resolution and creates a Watcher to watch the future updates.

type ServiceConfig

type ServiceConfig interface{}

type Update

type Update struct {
	// Op indicates the operation of the update.
	Op     OP
	Addr   string
	Config ServiceConfig
}

Update defines a name resolution change.

type Watcher

type Watcher interface {
	// Next blocks until an update or error happens. It may return one or more
	// updates.
	Next() ([]*Update, error)
	// Stop stops the Watcher.
	Stop()
}

Watcher watches the updates for a particular target.

Source Files

naming.go

Directories

PathSynopsis
Godeps/_workspace/src/google.golang.org/grpc/naming/etcd
Version
v0.2.0
Published
Feb 25, 2016
Platform
linux/amd64
Last checked
1 hour ago

Tools for package owners.