Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DatagramHandler ¶
DatagramHandler interface provides callback method to process received datagrams
type DatagramTransport ¶
type DatagramTransport interface { component.Starter component.Stopper SendDatagram(ctx context.Context, address string, data []byte) error Address() string }
DatagramTransport interface provides methods to send and receive datagrams
type Factory ¶
type Factory interface { CreateStreamTransport(StreamHandler) (StreamTransport, error) CreateDatagramTransport(DatagramHandler) (DatagramTransport, error) }
Factory interface provides methods for creating stream or datagram transports
func NewFactory ¶
func NewFactory(cfg configuration.Transport) Factory
NewFactory constructor creates new transport factory
func NewFakeFactory ¶
func NewFakeFactory(cfg configuration.Transport) Factory
NewFakeFactory constructor creates new fake transport factory
type StreamHandler ¶
type StreamHandler interface {
HandleStream(ctx context.Context, address string, stream io.ReadWriteCloser)
}
StreamHandler interface provides callback method to process data stream
type StreamTransport ¶
type StreamTransport interface { component.Starter component.Stopper Dial(ctx context.Context, address string) (io.ReadWriteCloser, error) Address() string }
StreamTransport interface provides methods to send and receive data streams
Click to show internal directories.
Click to hide internal directories.