gobbus

package module
v0.0.0-...-702ee01 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MIT Imports: 12 Imported by: 0

README

gobbus

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Topic string
	Flags *MessageFlags

	Rtopic string
	// contains filtered or unexported fields
}

func (*Message) GetBuf

func (m *Message) GetBuf() ([]byte, error)

func (*Message) GetDbl

func (m *Message) GetDbl() (float64, error)

func (*Message) GetInt

func (m *Message) GetInt() (int, error)

func (*Message) GetStr

func (m *Message) GetStr() (string, error)

func (*Message) GetValue

func (m *Message) GetValue() interface{}

func (*Message) String

func (m *Message) String() string

type MessageFlags

type MessageFlags struct {
	Instant      bool
	NonRecursive bool
	Response     bool
	Error        bool
}

func (*MessageFlags) String

func (f *MessageFlags) String() string

type Obbus

type Obbus struct {
	SyncCmdTimeout time.Duration
	Debug          bool
	DebugLabel     string
	// contains filtered or unexported fields
}

Obbus

func NewObbus

func NewObbus(conn io.ReadWriteCloser, opts ...*ObbusOpts) *Obbus

func (*Obbus) Close

func (o *Obbus) Close(err error)

func (*Obbus) GetContext

func (o *Obbus) GetContext() context.Context

func (*Obbus) Ping

func (o *Obbus) Ping(n int) (int, error)

func (*Obbus) PublishBuf

func (o *Obbus) PublishBuf(topic string, val []byte, flags *MessageFlags, rtopic string, ack bool) (int, error)

func (*Obbus) PublishDbl

func (o *Obbus) PublishDbl(topic string, val float64, flags *MessageFlags, rtopic string, ack bool) (int, error)

func (*Obbus) PublishInt

func (o *Obbus) PublishInt(topic string, val int, flags *MessageFlags, rtopic string, ack bool) (int, error)

func (*Obbus) PublishStr

func (o *Obbus) PublishStr(topic string, val string, flags *MessageFlags, rtopic string, ack bool) (int, error)

func (*Obbus) RpcBuf

func (o *Obbus) RpcBuf(path string, val []byte, flags *MessageFlags, tout time.Duration) (*Message, error)

func (*Obbus) RpcDbl

func (o *Obbus) RpcDbl(path string, val float64, flags *MessageFlags, tout time.Duration) (*Message, error)

func (*Obbus) RpcInt

func (o *Obbus) RpcInt(path string, val int, flags *MessageFlags, tout time.Duration) (*Message, error)

func (*Obbus) RpcStr

func (o *Obbus) RpcStr(path string, val string, flags *MessageFlags, tout time.Duration) (*Message, error)

func (*Obbus) SetTimeout

func (o *Obbus) SetTimeout(d time.Duration) error

func (*Obbus) SetTopicTable

func (o *Obbus) SetTopicTable(table []string) error

func (*Obbus) Subscribe

func (o *Obbus) Subscribe(ch chan *Message, path string) error

func (*Obbus) Unsubscribe

func (o *Obbus) Unsubscribe(ch chan *Message, path string) error

func (*Obbus) UnsubscribeAll

func (o *Obbus) UnsubscribeAll() (int, error)

type ObbusOpts

type ObbusOpts struct {
	Timeout        time.Duration
	SyncCmdTimeout time.Duration
	Debug          bool
	DebugLabel     string
}

Directories

Path Synopsis
modules

Jump to

Keyboard shortcuts

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