Documentation ¶
Index ¶
- type Cell
- type Command
- type Config
- type ConfigProtocol
- func (c ConfigProtocol) GetAddress() string
- func (c ConfigProtocol) GetCommandName() string
- func (c ConfigProtocol) GetLogicalName() string
- func (c ConfigProtocol) GetMsgType() string
- func (c ConfigProtocol) GetMyBrothers() []string
- func (c ConfigProtocol) GetShosetType() string
- func (c ConfigProtocol) GetYourBrothers() []string
- type Event
- type Iterator
- type Message
- type MessageBase
- func (m MessageBase) GetMajor() int8
- func (m MessageBase) GetMinor() int8
- func (m MessageBase) GetPayload() string
- func (m MessageBase) GetTenant() string
- func (m MessageBase) GetTimeout() int64
- func (m MessageBase) GetTimestamp() int64
- func (m MessageBase) GetToken() string
- func (m MessageBase) GetUUID() string
- func (m *MessageBase) InitMessageBase()
- type Queue
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct { RemoteShosetType string RemoteAddress string // contains filtered or unexported fields }
Cell : witch contain messages and useful intel
type Command ¶
type Command struct { MessageBase Target string Command string Context map[string]interface{} }
Command : gandalf commands
func NewCommand ¶
NewCommand : Command constructor todo : passer une map pour gerer les valeurs optionnelles ?
type Config ¶
type Config struct { MessageBase Target string Command string Context map[string]interface{} }
TODO MOVE TO GANDALF Config : gandalf configs
type ConfigProtocol ¶
type ConfigProtocol struct { MessageBase CommandName string LogicalName string ShosetType string Address string MyBrothers []string YourBrothers []string }
ConfigProtocol : Gandalf Socket config
func NewCfg ¶
func NewCfg(address, lName, shosetType, commandName string) *ConfigProtocol
for link and join
func NewCfgBrothers ¶
func NewCfgBrothers(myBrothers, yourBrothers []string, lName, commandName, shosetType string) *ConfigProtocol
for link
func (ConfigProtocol) GetCommandName ¶
func (c ConfigProtocol) GetCommandName() string
GetCommandName :
func (ConfigProtocol) GetLogicalName ¶
func (c ConfigProtocol) GetLogicalName() string
GetLogicalName :
func (ConfigProtocol) GetShosetType ¶
func (c ConfigProtocol) GetShosetType() string
GetShosetType :
func (ConfigProtocol) GetYourBrothers ¶
func (c ConfigProtocol) GetYourBrothers() []string
GetBros :
type Event ¶
type Event struct { MessageBase Topic string Event string ReferenceUUID string }
Event : Gandalf event internal
func NewEventClassic ¶
NewEventClassic : Event Classic constructor
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator : queue allowing access via a string key
type Message ¶
type Message interface { GetMsgType() string GetUUID() string GetTenant() string GetToken() string GetTimestamp() int64 GetTimeout() int64 GetPayload() string GetMajor() int8 GetMinor() int8 }
Message interface
type MessageBase ¶
type MessageBase struct { UUID string Tenant string Token string Timeout int64 Timestamp int64 Payload string Next string Major int8 Minor int8 }
MessageBase base struct for messages
func (*MessageBase) InitMessageBase ¶
func (m *MessageBase) InitMessageBase()
InitMessageBase constructor
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue : queue allowing access via a string key
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader : simple bufio.Reader safe for goroutines...
func (*Reader) ReadMessage ¶
ReadMessage : decode a message in a safe way for goroutines
func (*Reader) ReadString ¶
ReadString : safe version for goroutines
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer : simple bufio.Writer safe for goroutines...
func (*Writer) WriteMessage ¶
WriteMessage : encode a message in a safe way for goroutines