std

package
v0.0.0-...-c1a9e9f Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxEnvelopeSize = 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	*net.TCPConn
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(conn *net.TCPConn, scanner *bufio.Scanner, maxEnvelopeSize int) *Channel

func (*Channel) Close

func (c *Channel) Close() error

func (*Channel) Receive

func (c *Channel) Receive(ctx context.Context, cb func(envelope runTCP.EnvelopeReader)) error

func (*Channel) Send

func (c *Channel) Send(_ context.Context, envelopes ...runTCP.EnvelopeWriter) error

type ConsumeClient

type ConsumeClient struct {
	*net.TCPListener
	// Scanner splits the incoming data into Envelopes. If equal to nil, the data will
	// be split on chunks of MaxEnvelopeSize bytes, which is equal to bufio.MaxScanTokenSize by default.
	Scanner         *bufio.Scanner
	MaxEnvelopeSize int
}

func NewConsumer

func NewConsumer(listenURL string) (*ConsumeClient, error)

func (*ConsumeClient) Subscriber

type Decoder

type Decoder interface {
	Decode(v any) error
}

type EnvelopeIn

type EnvelopeIn struct {
	*bytes.Reader
}

func NewEnvelopeIn

func NewEnvelopeIn(msg []byte) *EnvelopeIn

func (*EnvelopeIn) Headers

func (e *EnvelopeIn) Headers() run.Headers

type EnvelopeOut

type EnvelopeOut struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func NewEnvelopeOut

func NewEnvelopeOut() *EnvelopeOut

func (*EnvelopeOut) ResetPayload

func (e *EnvelopeOut) ResetPayload()

func (*EnvelopeOut) SetBindings

func (e *EnvelopeOut) SetBindings(_ runTCP.MessageBindings)

func (*EnvelopeOut) SetContentType

func (e *EnvelopeOut) SetContentType(contentType string)

func (*EnvelopeOut) SetHeaders

func (e *EnvelopeOut) SetHeaders(headers run.Headers)

type ImplementationRecord

type ImplementationRecord interface {
	Bytes() []byte
}

type ProduceClient

type ProduceClient struct {
	net.Dialer
	// Scanner splits the incoming data into Envelopes. If equal to nil, the data is
	// split on chunks of MaxEnvelopeSize bytes, which is equal to bufio.MaxScanTokenSize by default.
	Scanner         *bufio.Scanner
	MaxEnvelopeSize int
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(serverURL string) (*ProduceClient, error)

func (ProduceClient) Publisher

Jump to

Keyboard shortcuts

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