github.com/lirm/aeron-go@v0.0.0-20230415210743-920325491dc4/cluster/client/options.go (about)

     1  package client
     2  
     3  import (
     4  	"github.com/lirm/aeron-go/aeron/idlestrategy"
     5  	"go.uber.org/zap/zapcore"
     6  )
     7  
     8  type Options struct {
     9  	RangeChecking      bool
    10  	Loglevel           zapcore.Level // [runtime] via logging.SetLevel()
    11  	IngressEndpoints   string
    12  	IngressChannel     string
    13  	IngressStreamId    int32
    14  	EgressChannel      string
    15  	EgressStreamId     int32
    16  	IdleStrategy       idlestrategy.Idler
    17  	IsIngressExclusive bool
    18  }
    19  
    20  func NewOptions() *Options {
    21  	return &Options{
    22  		RangeChecking:   true,
    23  		Loglevel:        zapcore.WarnLevel,
    24  		IngressStreamId: 101,
    25  		EgressChannel:   "aeron:udp?alias=cluster-egress|endpoint=localhost:0",
    26  		EgressStreamId:  102,
    27  		IdleStrategy:    idlestrategy.NewDefaultBackoffIdleStrategy(),
    28  	}
    29  }