...

Package proxy

import "bitbucket.org/twicedb/twicedb-go/client/proxy"
Overview
Index

Overview ▾

Package proxy provides a proxy to be used by the client to encapsulate common networking bits not specific to the TwiceDB client API.

Index ▾

type ClientProxy
    func NewClientProxy() *ClientProxy
    func NewClientProxyWithCert(certFile string, keyFile string, caFile string) *ClientProxy
    func (cp *ClientProxy) CheckReader(ctx context.Context, chr *healthp.HealthCheckRequest) (*healthp.HealthCheckResponse, error)
    func (cp *ClientProxy) CheckWriter(ctx context.Context, chr *healthp.HealthCheckRequest) (*healthp.HealthCheckResponse, error)
    func (cp *ClientProxy) Done()
    func (cp *ClientProxy) Read(ctx context.Context, rr *readerp.ReadRequest) (*ReadResponseWithTiming, error)
    func (cp *ClientProxy) ReadLsqt(ctx context.Context) (*readerp.ReadLsqtResponse, error)
    func (cp *ClientProxy) ReloadConfig(ctx context.Context) error
    func (cp *ClientProxy) SetAdminClient(ac adminp.AdminClient)
    func (cp *ClientProxy) SetReaderClient(rc readerp.ReaderClient)
    func (cp *ClientProxy) SetReaderClientFromAddress(serverAddr string)
    func (cp *ClientProxy) SetReaderHealthClient(rhc healthp.HealthClient)
    func (cp *ClientProxy) SetReaderStatusClient(sc statusp.StatusProviderClient)
    func (cp *ClientProxy) SetSubscribeClient(sc subscribep.SubscriptionManagerClient)
    func (cp *ClientProxy) SetWriterClient(wc writerp.WriterClient)
    func (cp *ClientProxy) SetWriterClientFromAddress(serverAddr string)
    func (cp *ClientProxy) SetWriterHealthClient(whc healthp.HealthClient)
    func (cp *ClientProxy) SetWriterStatusClient(sc statusp.StatusProviderClient)
    func (cp *ClientProxy) Status(ctx context.Context, st cshared.ServerType) (*cshared.ServerStatus, error)
    func (cp *ClientProxy) Subscribe(ctx context.Context, sr *subscribep.SubscribeRequest) (chan cshared.SubscribeResponse, error)
    func (cp *ClientProxy) Write(ctx context.Context, wr *writerp.WriteRequest) (*WriteResponseWithTiming, error)
type ReadResponseWithTiming
type WriteResponseWithTiming

Package files

client_proxy.go doc.go

type ClientProxy

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

func NewClientProxy

func NewClientProxy() *ClientProxy

func NewClientProxyWithCert

func NewClientProxyWithCert(certFile string, keyFile string, caFile string) *ClientProxy

func (*ClientProxy) CheckReader

func (cp *ClientProxy) CheckReader(ctx context.Context, chr *healthp.HealthCheckRequest) (*healthp.HealthCheckResponse, error)

func (*ClientProxy) CheckWriter

func (cp *ClientProxy) CheckWriter(ctx context.Context, chr *healthp.HealthCheckRequest) (*healthp.HealthCheckResponse, error)

func (*ClientProxy) Done

func (cp *ClientProxy) Done()

func (*ClientProxy) Read

func (cp *ClientProxy) Read(ctx context.Context, rr *readerp.ReadRequest) (*ReadResponseWithTiming, error)

func (*ClientProxy) ReadLsqt

func (cp *ClientProxy) ReadLsqt(ctx context.Context) (*readerp.ReadLsqtResponse, error)

func (*ClientProxy) ReloadConfig

func (cp *ClientProxy) ReloadConfig(ctx context.Context) error

func (*ClientProxy) SetAdminClient

func (cp *ClientProxy) SetAdminClient(ac adminp.AdminClient)

func (*ClientProxy) SetReaderClient

func (cp *ClientProxy) SetReaderClient(rc readerp.ReaderClient)

func (*ClientProxy) SetReaderClientFromAddress

func (cp *ClientProxy) SetReaderClientFromAddress(serverAddr string)

func (*ClientProxy) SetReaderHealthClient

func (cp *ClientProxy) SetReaderHealthClient(rhc healthp.HealthClient)

func (*ClientProxy) SetReaderStatusClient

func (cp *ClientProxy) SetReaderStatusClient(sc statusp.StatusProviderClient)

func (*ClientProxy) SetSubscribeClient

func (cp *ClientProxy) SetSubscribeClient(sc subscribep.SubscriptionManagerClient)

func (*ClientProxy) SetWriterClient

func (cp *ClientProxy) SetWriterClient(wc writerp.WriterClient)

func (*ClientProxy) SetWriterClientFromAddress

func (cp *ClientProxy) SetWriterClientFromAddress(serverAddr string)

func (*ClientProxy) SetWriterHealthClient

func (cp *ClientProxy) SetWriterHealthClient(whc healthp.HealthClient)

func (*ClientProxy) SetWriterStatusClient

func (cp *ClientProxy) SetWriterStatusClient(sc statusp.StatusProviderClient)

func (*ClientProxy) Status

func (cp *ClientProxy) Status(ctx context.Context, st cshared.ServerType) (*cshared.ServerStatus, error)

func (*ClientProxy) Subscribe

func (cp *ClientProxy) Subscribe(ctx context.Context, sr *subscribep.SubscribeRequest) (chan cshared.SubscribeResponse, error)

func (*ClientProxy) Write

func (cp *ClientProxy) Write(ctx context.Context, wr *writerp.WriteRequest) (*WriteResponseWithTiming, error)

type ReadResponseWithTiming

type ReadResponseWithTiming struct {
    Response *readerp.ReadResponse
    Elapsed  int64
}

type WriteResponseWithTiming

type WriteResponseWithTiming struct {
    Response *writerp.WriteResponse
    Elapsed  int64
}