db

package
v0.0.0-...-1ce3cd0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2015 License: Apache-2.0, Apache-2.0, BSD-2-Clause-Views, + 2 more Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyNotFound = "KeyNotFound"
)

Variables

This section is empty.

Functions

func NewETCD

func NewETCD(nodeURLs []string, maxWorkers uint) (*etcd, error)

Types

type DB

type DB interface {
	ReadRoutes() ([]Route, error)
	SaveRoute(route Route) error
	DeleteRoute(route Route) error
	Connect() error
	Disconnect() error
	WatchRouteChanges() (<-chan storeadapter.WatchEvent, chan<- bool, <-chan error)
}

type DBError

type DBError struct {
	Type    string
	Message string
}

func (DBError) Error

func (err DBError) Error() string

type Route

type Route struct {
	Route           string `json:"route"`
	Port            uint16 `json:"port"`
	IP              string `json:"ip"`
	TTL             int    `json:"ttl"`
	LogGuid         string `json:"log_guid"`
	RouteServiceUrl string `json:"route_service_url,omitempty"`
}

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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