messaging

package
v0.0.0-...-ddbe4fe Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//Logger is the global zap logger
	Logger zerolog.Logger
	//StormDB is the global bolt database variable
	StormDB *storm.DB
)

Functions

func MessageDecode

func MessageDecode(msg []byte)

MessageDecode handles all incoming messages

func MessageEncode

func MessageEncode(msg BaseMessage) []byte

MessageEncode will encode and test the message (and maybe send it?)

Types

type BaseMessage

type BaseMessage struct {
	MessageType string
	MessageBody interface{}
}

BaseMessage is the base message for all messages sent/received

type RegisterAgent

type RegisterAgent struct {
	AgentID       int `storm:"id,increment"`
	AgentHostName string
	AgentIPAddr   string
	AgentJoinDate time.Time
}

RegisterAgent is for agents to register with the server

Jump to

Keyboard shortcuts

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