server

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2014 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDService

func IDService(idChan chan string)

Types

type BlockInfo

type BlockInfo struct {
	Id       string
	Type     string
	Rule     interface{}
	Position *Coords
	// contains filtered or unexported fields
}

type BlockManager

type BlockManager struct {
	Mu *sync.Mutex
	// contains filtered or unexported fields
}

func NewBlockManager

func NewBlockManager() *BlockManager

func (*BlockManager) Connect

func (b *BlockManager) Connect(connInfo *ConnectionInfo) (*ConnectionInfo, error)

func (*BlockManager) Create

func (b *BlockManager) Create(blockInfo *BlockInfo) (*BlockInfo, error)

func (*BlockManager) DeleteBlock

func (b *BlockManager) DeleteBlock(id string) ([]string, error)

func (*BlockManager) DeleteConnection

func (b *BlockManager) DeleteConnection(id string) (string, error)

func (*BlockManager) DeleteSocket

func (b *BlockManager) DeleteSocket(blockId string, connId string) error

func (*BlockManager) GetBlock

func (b *BlockManager) GetBlock(id string) (*BlockInfo, error)

func (*BlockManager) GetConnection

func (b *BlockManager) GetConnection(id string) (*ConnectionInfo, error)

func (*BlockManager) GetId

func (b *BlockManager) GetId() string

func (*BlockManager) GetSocket

func (b *BlockManager) GetSocket(fromId string) (chan *blocks.Msg, string, error)

func (*BlockManager) IdExists

func (b *BlockManager) IdExists(id string) bool

func (*BlockManager) IdSafe

func (b *BlockManager) IdSafe(id string) bool

func (*BlockManager) ListBlocks

func (b *BlockManager) ListBlocks() []*BlockInfo

func (*BlockManager) ListConnections

func (b *BlockManager) ListConnections() []*ConnectionInfo

func (*BlockManager) QueryBlock

func (b *BlockManager) QueryBlock(id string, route string) (interface{}, error)

func (*BlockManager) QueryConnection

func (b *BlockManager) QueryConnection(id string, route string) (interface{}, error)

func (*BlockManager) Send

func (b *BlockManager) Send(id string, route string, msg interface{}) error

func (*BlockManager) StatusBlocks added in v0.2.3

func (b *BlockManager) StatusBlocks() []string

func (*BlockManager) UpdateBlock

func (b *BlockManager) UpdateBlock(id string, coord *Coords) (*BlockInfo, error)

type ConnectionInfo

type ConnectionInfo struct {
	Id      string
	FromId  string
	ToId    string
	ToRoute string
	// contains filtered or unexported fields
}

type Coords

type Coords struct {
	X float64
	Y float64
}

type Server

type Server struct {
	Port   string
	Domain string
	Id     string
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Run

func (s *Server) Run()

Jump to

Keyboard shortcuts

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