clientgo

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: Apache-2.0 Imports: 9 Imported by: 1

README

client-go

The Go version client library.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRoute route information wrong
	ErrRoute = errors.New("route wrong")
)

Functions

This section is empty.

Types

type ExchClient

type ExchClient struct {
	// contains filtered or unexported fields
}

ExchClient used to exchange data with TraceRun server an one time connection used to get data from server

func NewExchClient

func NewExchClient(port uint16, address string) (*ExchClient, bool, error)

NewExchClient to create an exchange client.

func (*ExchClient) GetActions

func (cli *ExchClient) GetActions() ([]string, []uint32, []uint32, error)

GetActions to get all actions

func (*ExchClient) GetMeta

func (cli *ExchClient) GetMeta() (*service.Meta, error)

GetMeta to get meta information

func (*ExchClient) GetSlots

func (cli *ExchClient) GetSlots(target string, from, to uint32) ([]uint32, []uint32, error)

GetSlots to get slots of a target

func (*ExchClient) GetTargets

func (cli *ExchClient) GetTargets() ([]string, error)

GetTargets to get all the targets

type SendClient

type SendClient struct {
	// contains filtered or unexported fields
}

SendClient used to send data to TraceRun server

func NewSendClient

func NewSendClient(port uint16, address string) (*SendClient, bool, error)

NewSendClient to create a new send client, returning an instance, whether you can reach the server, error

func (*SendClient) Ping

func (cli *SendClient) Ping() error

Ping to ping server

func (*SendClient) SendAction

func (cli *SendClient) SendAction(target string) error

SendAction to send an action

func (*SendClient) StopServer

func (cli *SendClient) StopServer() error

StopServer to stop the server

Jump to

Keyboard shortcuts

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