hermes

package module
v0.0.0-...-b650d88 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

README

hermes

Documentation

Index

Constants

View Source
const (
	REGUSER = iota
	UNREGUSER
	MESSAGE
	BROADCAST
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c *Config) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) Init

func (c *Client) Init() (chan *Message, error)

func (*Client) SendMessage

func (c *Client) SendMessage(msg *Message) error

type Config

type Config struct {
	Username       string
	ServerEndpoint string
}

func NewConfig

func NewConfig(username, serverEndpoint string) *Config

type Message

type Message struct {
	Type      int
	Recipient string
	Sender    string
	Body      string
}

func NewMessage

func NewMessage(messageType int, sender, recipient, body string) *Message

func ParseMessage

func ParseMessage(msg []string) (*Message, error)

func (*Message) ToStringArray

func (m *Message) ToStringArray() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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