objstore: github.com/SphereSoftware/objstore/api Index | Files

package api

import "github.com/SphereSoftware/objstore/api"

Index

Package Files

private.go public.go

Constants

const (
    KB  = 1024
    MB  = 1024 * KB
    GB  = 1024 * MB
)

Variables

var (
    RangeStop   = errors.New("stop")
    ForEachStop = RangeStop
)

type DiskStats Uses

type DiskStats struct {
    *objstore.DiskStats

    KBytesAll  float64 `json:"kb_all"`
    KBytesUsed float64 `json:"kb_used"`
    KBytesFree float64 `json:"kb_free"`

    MBytesAll  float64 `json:"mb_all"`
    MBytesUsed float64 `json:"mb_used"`
    MBytesFree float64 `json:"mb_free"`

    GBytesAll  float64 `json:"gb_all"`
    GBytesUsed float64 `json:"gb_used"`
    GBytesFree float64 `json:"gb_free"`
}

type NodeInfo Uses

type NodeInfo struct {
    ID    string `json:"id"`
    Addr  string `json:"addr"`
    VAddr string `json:"vaddr"`
}

type NodeIter Uses

type NodeIter func(id, addr, vaddr string) error

type PrivateServer Uses

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

func NewPrivateServer Uses

func NewPrivateServer(nodeID string, tags ...string) *PrivateServer

func (*PrivateServer) AnnounceHandler Uses

func (p *PrivateServer) AnnounceHandler(store objstore.Store) gin.HandlerFunc

func (*PrivateServer) DeleteHandler Uses

func (p *PrivateServer) DeleteHandler(store objstore.Store) gin.HandlerFunc

func (*PrivateServer) Env Uses

func (p *PrivateServer) Env() []string

func (*PrivateServer) ExposeAPI Uses

func (p *PrivateServer) ExposeAPI(addr string) error

ExposeAPI initiates HTTP routing to the private API via loopback.

func (*PrivateServer) GetHandler Uses

func (p *PrivateServer) GetHandler(store objstore.Store) gin.HandlerFunc

func (*PrivateServer) JoinCluster Uses

func (p *PrivateServer) JoinCluster(nodes []string) error

JoinCluster connects to another machines via TCP to join the virtual network.

func (*PrivateServer) ListNodesHandler Uses

func (p *PrivateServer) ListNodesHandler() gin.HandlerFunc

func (*PrivateServer) ListenAndServe Uses

func (p *PrivateServer) ListenAndServe(addr string) error

ListenAndServe initializes a HTTP listener for private services, starts listening on a TCP address for virtual network transport.

func (*PrivateServer) MessageHandler Uses

func (p *PrivateServer) MessageHandler(store objstore.Store) gin.HandlerFunc

func (*PrivateServer) PingHandler Uses

func (p *PrivateServer) PingHandler() gin.HandlerFunc

func (*PrivateServer) PutHandler Uses

func (p *PrivateServer) PutHandler(store objstore.Store) gin.HandlerFunc

func (*PrivateServer) RouteAPI Uses

func (p *PrivateServer) RouteAPI(store objstore.Store)

func (*PrivateServer) Router Uses

func (p *PrivateServer) Router() astranet.AstraNet

func (*PrivateServer) SetDebug Uses

func (p *PrivateServer) SetDebug(enabled bool)

func (*PrivateServer) SyncHandler Uses

func (p *PrivateServer) SyncHandler(store objstore.Store) gin.HandlerFunc

type PublicServer Uses

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

func NewPublicServer Uses

func NewPublicServer(nodeID string) *PublicServer

func (*PublicServer) DeleteHandler Uses

func (p *PublicServer) DeleteHandler(store objstore.Store) gin.HandlerFunc

func (*PublicServer) GetHandler Uses

func (p *PublicServer) GetHandler(store objstore.Store) gin.HandlerFunc

func (*PublicServer) IDHandler Uses

func (p *PublicServer) IDHandler() gin.HandlerFunc

func (*PublicServer) ListenAndServe Uses

func (p *PublicServer) ListenAndServe(addr string) error

func (*PublicServer) MetaHandler Uses

func (p *PublicServer) MetaHandler(store objstore.Store) gin.HandlerFunc

func (*PublicServer) PingHandler Uses

func (p *PublicServer) PingHandler() gin.HandlerFunc

func (*PublicServer) PutHandler Uses

func (p *PublicServer) PutHandler(store objstore.Store) gin.HandlerFunc

func (*PublicServer) RouteAPI Uses

func (p *PublicServer) RouteAPI(store objstore.Store)

func (*PublicServer) StatsHandler Uses

func (p *PublicServer) StatsHandler(store objstore.Store) gin.HandlerFunc

func (*PublicServer) VersionHandler Uses

func (p *PublicServer) VersionHandler() gin.HandlerFunc

type Stats Uses

type Stats struct {
    DiskStats *DiskStats `json:"disk_stats"`
}

type SyncResponse Uses

type SyncResponse struct {
    Added   objstore.FileMetaList `json:"list_added"`
    Deleted objstore.FileMetaList `json:"list_deleted"`
}

Package api imports 18 packages (graph). Updated 2017-09-27. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).