interfaces

package
v0.0.0-...-31f5ead Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Encode(...interface{}) ([]byte, error)
	Decode([]byte, ...interface{}) error
}

Codec interface

type Logger

type Logger = logger.Logger

Logger interface

type Request

type Request interface {
	GetPath() string
	SetPath(string) Request
	GetID() string
	SetID(string) Request
	GetTimeout() *int
	SetTimeout(int) Request
	SetTimeoutDuration(duration time.Duration) Request
	GetMeta() map[string]string
	SetMeta(map[string]string) Request
	GetMetaProp(key string) string
	SetMetaProp(key, value string) Request
	GetParams() []byte
	ParseParams(interface{}) error
	SetParams(interface{}) error
	SetError(error) Request
}

Request interface

type Response

type Response interface {
	GetError() *oerror.Error
	SetError(*oerror.Error) Response
	ParsePayload(interface{}) error
	SetPayload(interface{}) error
}

Response interface

type Transport

type Transport interface {
	Listen(func())
	Publish(string, []byte) error
	Subscribe(string, string, func([]byte)) error
	SubscribeForRawMsg(string, string, func(interface{})) error
	Handle(string, string, func([]byte, func([]byte))) error
	Request(string, []byte, int) ([]byte, error)
	Close()
	IsOpen() bool
	OnClose(interface{})
}

Transport interface

Jump to

Keyboard shortcuts

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