Versions in this module Expand all Collapse all v0 v0.1.5 Aug 21, 2023 Changes in this version + var ErrProxyAlreadyConnected = errors.New("proxy already connected") + var ErrProxyClosed = errors.New("proxy closed") + var ErrProxyNotConnected = errors.New("proxy not connected") + func NewDefaultPreparedCache(size int) (proxycore.PreparedCache, error) + func Run(ctx context.Context, args []string) int + type Config struct + Auth proxycore.Authenticator + ConnectTimeout time.Duration + DC string + HeartBeatInterval time.Duration + IdempotentGraph bool + IdleTimeout time.Duration + Logger *zap.Logger + MaxVersion primitive.ProtocolVersion + NumConns int + Peers []PeerConfig + PreparedCache proxycore.PreparedCache + RPCAddr string + ReconnectPolicy proxycore.ReconnectPolicy + Resolver proxycore.EndpointResolver + RetryPolicy RetryPolicy + Tokens []string + Version primitive.ProtocolVersion + type PeerConfig struct + DC string + RPCAddr string + Tokens []string + type Proxy struct + func NewProxy(ctx context.Context, config Config) *Proxy + func (p *Proxy) Close() error + func (p *Proxy) Connect() error + func (p *Proxy) OnEvent(event proxycore.Event) + func (p *Proxy) OutageDuration() time.Duration + func (p *Proxy) Ready() bool + func (p *Proxy) Serve(l net.Listener) (err error) + type RetryDecision int + const RetryNext + const RetrySame + const ReturnError + func (r RetryDecision) String() string + type RetryPolicy interface + OnErrorResponse func(msg message.Error, retryCount int) RetryDecision + OnReadTimeout func(msg *message.ReadTimeout, retryCount int) RetryDecision + OnUnavailable func(msg *message.Unavailable, retryCount int) RetryDecision + OnWriteTimeout func(msg *message.WriteTimeout, retryCount int) RetryDecision + func NewDefaultRetryPolicy() RetryPolicy