messages

package
v0.5.34 Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TypeMap map[string]reflect.Type

TypeMap stores a list of messages types and provides a way to deserialize messages

Functions

func Pack

func Pack(payload interface{}) ([]byte, error)

Pack serializes a message into a byte array

Types

type AuthControl

type AuthControl struct {
	Token string
}

AuthControl is sent by the client to create and authenticate a new session

type AuthTunnel

type AuthTunnel struct {
	ClientID string
	Token    string
}

AuthTunnel is sent by the client to create and authenticate a tunnel connection

type Envelope

type Envelope struct {
	Type    string
	Payload json.RawMessage
}

Envelope is a wrapper struct used to encode message types as they are serialized to JSON

type Message

type Message interface{}

Message is a generic interface for all the messages

func Unpack

func Unpack(buffer []byte) (msg Message, err error)

Unpack deserializes byte array into a message

type OpenTunnel

type OpenTunnel struct {
	ClientID string
}

OpenTunnel is sent by server to the client to request a new Tunnel connection

type Ping

type Ping struct{}

Ping is sent to request a Pong response and check the liveness of the connection

type Pong

type Pong struct{}

Pong is a response ot the Ping message

type Release

type Release struct {
	ID                     string    `redis:"id,omitempty"`
	Branch                 string    `redis:"branch,omitempty"`
	Description            string    `redis:"description,omitempty"`
	VCSType                string    `redis:"vcs_type,omitempty"`
	VCSRevision            string    `redis:"vcs_revision,omitempty"`
	VCSRevisionMessage     string    `redis:"vcs_revision_message,omitempty"`
	VCSRevisionTime        time.Time `redis:"vcs_revision_time,omitempty"`
	VCSRevisionAuthorName  string    `redis:"vcs_revision_author_name,omitempty"`
	VCSRevisionAuthorEmail string    `redis:"vcs_revision_author_email,omitempty"`
}

Release contains basic VCS (e.g. git) information about the running version of client server

type Shutdown

type Shutdown struct {
	Error string
}

Shutdown is sent either by server or client to indicate that the session should be torn down

Jump to

Keyboard shortcuts

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