Package proxy
import "bitbucket.org/twicedb/twicedb-go/client/proxy"
- Overview
- Index
Package proxy provides a proxy to be used by the client to encapsulate common
networking bits not specific to the TwiceDB client API.
- 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 struct {
}
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 (*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 (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 (*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 struct {
Response *readerp.ReadResponse
Elapsed int64
}
type WriteResponseWithTiming struct {
Response *writerp.WriteResponse
Elapsed int64
}