client

package
v0.0.0-...-f6902ab Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TemporaryError = errors.New("temporary error")

Functions

This section is empty.

Types

type AeronCluster

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

func NewAeronCluster

func NewAeronCluster(
	aeronCtx *aeron.Context,
	options *Options,
	egressListener EgressListener,
) (*AeronCluster, error)

func (*AeronCluster) Close

func (ac *AeronCluster) Close()

func (*AeronCluster) ClusterSessionId

func (ac *AeronCluster) ClusterSessionId() int64

func (*AeronCluster) IsClosed

func (ac *AeronCluster) IsClosed() bool

func (*AeronCluster) IsConnected

func (ac *AeronCluster) IsConnected() bool

func (*AeronCluster) LeaderMemberId

func (ac *AeronCluster) LeaderMemberId() int32

func (*AeronCluster) LeadershipTermId

func (ac *AeronCluster) LeadershipTermId() int64

func (*AeronCluster) Offer

func (ac *AeronCluster) Offer(buffer *atomic.Buffer, offset, length int32) int64

func (*AeronCluster) Poll

func (ac *AeronCluster) Poll() int

func (*AeronCluster) SendKeepAlive

func (ac *AeronCluster) SendKeepAlive() bool

type EgressListener

type EgressListener interface {
	OnConnect(cluster *AeronCluster)

	OnDisconnect(cluster *AeronCluster, details string)

	OnMessage(
		cluster *AeronCluster,
		timestamp int64,
		buffer *atomic.Buffer,
		offset int32,
		length int32,
		header *logbuffer.Header,
	)

	OnNewLeader(
		cluster *AeronCluster,
		leadershipTermId int64,
		leaderMemberId int32,
	)

	OnError(cluster *AeronCluster, details string)
}

type Options

type Options struct {
	RangeChecking      bool
	Loglevel           zapcore.Level // [runtime] via logging.SetLevel()
	IngressEndpoints   string
	IngressChannel     string
	IngressStreamId    int32
	EgressChannel      string
	EgressStreamId     int32
	IdleStrategy       idlestrategy.Idler
	IsIngressExclusive bool
}

func NewOptions

func NewOptions() *Options

Jump to

Keyboard shortcuts

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