temp

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2016 License: Apache-2.0 Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTemp

func NewTemp(cfg torus.Config) (torus.MetadataService, error)

Types

type Client

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

func NewClient

func NewClient(cfg torus.Config, srv *Server) *Client

func (*Client) Close

func (t *Client) Close() error

func (*Client) CommitINodeIndex

func (t *Client) CommitINodeIndex(vol torus.VolumeID) (torus.INodeID, error)

func (*Client) CreateVolume added in v0.1.0

func (t *Client) CreateVolume(volume *models.Volume) error

func (*Client) DeleteVolume added in v0.1.0

func (t *Client) DeleteVolume(name string) error

func (*Client) GetData

func (t *Client) GetData(x string) (interface{}, bool)

func (*Client) GetINodeIndex

func (t *Client) GetINodeIndex(volume torus.VolumeID) (torus.INodeID, error)

func (*Client) GetINodeIndexes

func (t *Client) GetINodeIndexes() (map[torus.VolumeID]torus.INodeID, error)

func (*Client) GetLease

func (t *Client) GetLease() (int64, error)

func (*Client) GetPeers

func (t *Client) GetPeers() (torus.PeerInfoList, error)

func (*Client) GetRing

func (t *Client) GetRing() (torus.Ring, error)

func (*Client) GetVolume

func (t *Client) GetVolume(volume string) (*models.Volume, error)

func (*Client) GetVolumes

func (t *Client) GetVolumes() ([]*models.Volume, torus.VolumeID, error)

func (*Client) GlobalMetadata

func (t *Client) GlobalMetadata() (torus.GlobalMetadata, error)

func (*Client) Kind

func (t *Client) Kind() torus.MetadataKind

func (*Client) LockData

func (t *Client) LockData()

func (*Client) NewVolumeID

func (t *Client) NewVolumeID() (torus.VolumeID, error)

func (*Client) RegisterPeer

func (t *Client) RegisterPeer(_ int64, pi *models.PeerInfo) error

func (*Client) RenewLease added in v0.1.1

func (t *Client) RenewLease(lease int64) error

func (*Client) SetData

func (t *Client) SetData(x string, v interface{})

func (*Client) SetRing

func (t *Client) SetRing(ring torus.Ring) error

func (*Client) SubscribeNewRings

func (t *Client) SubscribeNewRings(ch chan torus.Ring)

func (*Client) UUID

func (t *Client) UUID() string

func (*Client) UnlockData

func (t *Client) UnlockData()

func (*Client) UnsubscribeNewRings

func (t *Client) UnsubscribeNewRings(ch chan torus.Ring)

func (*Client) WithContext

func (t *Client) WithContext(_ context.Context) torus.MetadataService

type Server

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

func NewServer

func NewServer() *Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) SetRing

func (s *Server) SetRing(ring torus.Ring) error

func (*Server) SubscribeNewRings

func (s *Server) SubscribeNewRings(ch chan torus.Ring)

func (*Server) UnsubscribeNewRings

func (s *Server) UnsubscribeNewRings(ch chan torus.Ring)

Jump to

Keyboard shortcuts

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