Outgoing

package
v0.0.0-...-a93fc24 Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCInterface

type RPCInterface struct {
	Config *tls.Config
	// contains filtered or unexported fields
}

RPCInterface represents a outgoing RPC connection, with which a rpc.Client can be created

func NewRPCInterface

func NewRPCInterface(serverAddress string) *RPCInterface

NewRPCInterface constructs a new RPCInterface

func (*RPCInterface) Connect

func (rpcI *RPCInterface) Connect() error

Connect establishes a tcp connection and single byte for authentication and creates a rpc.Client

func (RPCInterface) CreateDelayedEvent

func (rpcI RPCInterface) CreateDelayedEvent(event []byte, delay *time.Duration) (err error)

CreateDelayedEvent encapsulates the RPC call to create a DelayedEvent on the server

func (RPCInterface) CreateEvent

func (rpcI RPCInterface) CreateEvent(event []byte) (err error)

CreateEvent encapsulates the RPC call to create a Event on the server

func (RPCInterface) Disconnect

func (rpcI RPCInterface) Disconnect()

Disconnect closes the tcp connection

func (RPCInterface) MakeCall

func (rpcI RPCInterface) MakeCall(command string, event []byte) (result *Module.Result, err error)

MakeCall executes a given Module on the other side

func (RPCInterface) SendMessage

func (rpcI RPCInterface) SendMessage(message *LogServer.LogMessage) (err error)

SendMessage sends a message to the logserver

func (RPCInterface) SendMessages

func (rpcI RPCInterface) SendMessages(messages *[]*LogServer.LogMessage) (err error)

SendMessages sends a multiple messages to the logserver

Jump to

Keyboard shortcuts

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