api

package
v0.0.0-...-2b54d2d Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_END_POINT = "/source"
View Source
const DEFAULT_PORT = 7788
View Source
const HEARTBEAT_INTERVAL = 20 * time.Second

Variables

This section is empty.

Functions

func GzipDecode

func GzipDecode(in []byte) ([]byte, error)

Types

type Client

type Client struct {
	SendCh chan *message.Message
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, port int, endPoint string, callback MessageCallback) *Client

func (*Client) Read

func (this *Client) Read()

func (*Client) SetSecure

func (this *Client) SetSecure(secure bool)

func (*Client) Start

func (this *Client) Start() error

func (*Client) Stop

func (this *Client) Stop()

func (*Client) Subscribe

func (this *Client) Subscribe(subjects []string)

func (*Client) UnSubscribe

func (this *Client) UnSubscribe(subjects []string)

func (*Client) Write

func (this *Client) Write()

type MessageCallback

type MessageCallback interface {
	OnMessage(message *message.Message, raw []byte)
	OnError(err error)
}

type Server

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

func NewServer

func NewServer(conf config.Config, port int, endPoint string) *Server

func (*Server) Publish

func (this *Server) Publish(msg message.Message)

func (*Server) Start

func (this *Server) Start()

Jump to

Keyboard shortcuts

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