gmap

package module
v0.0.0-...-7252c7b Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2014 License: Apache-2.0 Imports: 13 Imported by: 0

README

gmap

GlobalMap

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MyStore = NewSafeStore()

Functions

func Join

func Join(url string) error

func Listen

func Listen(listen string) error

func ListenAndJoin

func ListenAndJoin(listen string, join []string) error

func NewConnection

func NewConnection(ws *websocket.Conn) (*connection, error)

func StartAutoDiscover

func StartAutoDiscover() error

func Wait

func Wait()

Types

type Command

type Command struct {
	Action  string
	Entries map[string]interface{}
}

type Entry

type Entry struct {
	Key   string
	Value interface{}
}

type NodeInfo

type NodeInfo struct {
	Name string
	Host string
	URL  string
	Addr string
	Pid  int
}
var MyNode NodeInfo

func (*NodeInfo) String

func (n *NodeInfo) String() string

type Owner

type Owner struct {
	Node   *NodeInfo
	Client string
}

type OwnerMap

type OwnerMap struct {
	Data map[Owner]interface{}
	// contains filtered or unexported fields
}

func (*OwnerMap) Get

func (om *OwnerMap) Get(owner Owner) interface{}

func (*OwnerMap) Put

func (om *OwnerMap) Put(owner Owner, value interface{})

func (*OwnerMap) String

func (om *OwnerMap) String() string

type Store

type Store struct {
	Data map[string]*OwnerMap
	// contains filtered or unexported fields
}

func NewSafeStore

func NewSafeStore() *Store

func NewStore

func NewStore() *Store

func (*Store) AddAll

func (s *Store) AddAll(store *Store)

func (*Store) GetMyEntries

func (s *Store) GetMyEntries() *Store

func (*Store) GetOrCreateOwnerMap

func (s *Store) GetOrCreateOwnerMap(path string) *OwnerMap

func (*Store) GetOwnerMap

func (s *Store) GetOwnerMap(path string) *OwnerMap

func (*Store) Put

func (s *Store) Put(path string, client string, value interface{})

func (*Store) PutStatic

func (s *Store) PutStatic(path string, value interface{})

func (*Store) ReadAll

func (s *Store) ReadAll(proc StoreWalker)

func (*Store) RemoveForNode

func (s *Store) RemoveForNode(node *NodeInfo)

func (*Store) Spew

func (s *Store) Spew() string

func (*Store) String

func (s *Store) String() string

type StoreWalker

type StoreWalker func(path string, owner Owner, value interface{})

type Sync

type Sync struct {
	Action string
	Node   string
	Store  *Store
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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