store

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeleteCategory = "delete"
	Deleted        = "true"
	NonDeleted     = "false"
)
View Source
const (
	ObjectTypePods = "pods"
)

Variables

This section is empty.

Functions

func PodObjectIndexFuncFactory

func PodObjectIndexFuncFactory(fieldCategory, fieldName string) cache.IndexFunc

make a factory to produce indexFunc for those regular field category, such as meta, spec, status etc. fieldName is a helper while we can NOT determine the key via fieldCategory.

Types

type KStore

type KStore struct {

	// raft and consensus mechanism
	RaftDir, RaftBind, JoinAddr string // TODO: ensure dir exists.

	// http server configurations
	HttpBind string
	// contains filtered or unexported fields
}

func New

func New(client clientset.Interface, httpBind, raftBind, raftDir, join string) *KStore

func (*KStore) GetCacheAsJson

func (ks *KStore) GetCacheAsJson() (string, error)

func (*KStore) GetCacheByIndex

func (ks *KStore) GetCacheByIndex(indexName, indexKey string) (string, error)

func (*KStore) GetCacheByMultipleIndex

func (ks *KStore) GetCacheByMultipleIndex(indexKV map[string][]string) (string, error)

func (*KStore) GetIndiceByName

func (ks *KStore) GetIndiceByName(indexName string) ([]string, error)

func (*KStore) Join

func (ks *KStore) Join(nodeID, addr string) error

Join do raft peer join(ONLY leader can do this)

func (*KStore) Reset

func (ks *KStore) Reset(data *map[string]*cache.ObjectDef) error

func (*KStore) ServeHttp

func (ks *KStore) ServeHttp()

func (*KStore) Start

func (ks *KStore) Start(enableSingleNode bool, localID string)

func (*KStore) Stop

func (ks *KStore) Stop()

func (*KStore) Stopped

func (ks *KStore) Stopped() bool

func (*KStore) WaitUtilStop

func (ks *KStore) WaitUtilStop()

Jump to

Keyboard shortcuts

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