ipc

package
v0.0.0-...-b967545 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2017 License: BSD-3-Clause Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMsg

type BaseMsg struct {
	Type       string
	MsgID      int
	IsResponse bool
	Body       json.RawMessage
}

type Message

type Message struct {
	Type  string
	MsgID int
	Body  interface{}
	Ucred *syscall.Ucred
	Fds   []int
	// contains filtered or unexported fields
}

func (*Message) Free

func (m *Message) Free()

func (*Message) Respond

func (m *Message) Respond(msg interface{}, fds ...int) error

type MsgConn

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

func Connect

func Connect(address string, factory MsgFactory, log *logging.Logger, handlers ...interface{}) (*MsgConn, error)

func (*MsgConn) AddHandlers

func (mc *MsgConn) AddHandlers(args ...interface{}) error

func (*MsgConn) Close

func (mc *MsgConn) Close() error

func (*MsgConn) ExchangeMsg

func (mc *MsgConn) ExchangeMsg(msg interface{}, fds ...int) (ResponseReader, error)

func (*MsgConn) SendMsg

func (mc *MsgConn) SendMsg(msg interface{}, fds ...int) error

type MsgFactory

type MsgFactory map[string](func() interface{})

func NewMsgFactory

func NewMsgFactory(msgTypes ...interface{}) MsgFactory

type MsgServer

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

func NewServer

func NewServer(address string, factory MsgFactory, log *logging.Logger, handlers ...interface{}) (*MsgServer, error)

func (*MsgServer) Close

func (s *MsgServer) Close() error

func (*MsgServer) Run

func (s *MsgServer) Run() error

type ResponseReader

type ResponseReader interface {
	Chan() <-chan *Message
	Done()
}

Jump to

Keyboard shortcuts

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