datasrvmgr

package
v0.0.0-...-c5655c4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 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 Manager

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

Manager manages a data server store and provides an in memory cache of data server's url for quick look ups

func New

func New(s datasrvstore.Store) *Manager

New creates a new data server manager

func (*Manager) AddServer

func (mgr *Manager) AddServer(url string) error

AddServer adds a new data server to the store if it is not already in the store. The given data server will be set as 'current' (used for new bushes)

func (*Manager) GetAllServers

func (mgr *Manager) GetAllServers() ([]*datasrvstore.Server, error)

GetAllServers returns a list of all data servers

func (*Manager) GetNextAvailable

func (mgr *Manager) GetNextAvailable() (int, error)

GetNextAvailable returns the data server that new bushes are allocated on

func (*Manager) GetURL

func (mgr *Manager) GetURL(id int) (string, error)

GetURL ...

Jump to

Keyboard shortcuts

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