Documentation
¶
Index ¶
- type EndpointConfig
- type EndpointResolverConfig
- type FallbackEndpointConfig
- type InsecureCreds
- type SmartClient
- func (sc *SmartClient) Check(ctx context.Context, req *v0.CheckRequest, opts ...grpc.CallOption) (*v0.CheckResponse, error)
- func (sc *SmartClient) ContentChangeCheck(ctx context.Context, req *v0.ContentChangeCheckRequest, ...) (*v0.CheckResponse, error)
- func (sc *SmartClient) Expand(ctx context.Context, req *v0.ExpandRequest, opts ...grpc.CallOption) (*v0.ExpandResponse, error)
- func (sc *SmartClient) Lookup(ctx context.Context, req *v0.LookupRequest, opts ...grpc.CallOption) (*v0.LookupResponse, error)
- func (sc *SmartClient) Read(ctx context.Context, req *v0.ReadRequest, opts ...grpc.CallOption) (*v0.ReadResponse, error)
- func (sc *SmartClient) ReadConfig(ctx context.Context, req *v0.ReadConfigRequest, opts ...grpc.CallOption) (*v0.ReadConfigResponse, error)
- func (sc *SmartClient) ReadSchema(ctx context.Context, req *v1alpha1.ReadSchemaRequest, opts ...grpc.CallOption) (*v1alpha1.ReadSchemaResponse, error)
- func (sc *SmartClient) Stop()
- func (sc *SmartClient) Write(ctx context.Context, req *v0.WriteRequest, opts ...grpc.CallOption) (*v0.WriteResponse, error)
- func (sc *SmartClient) WriteConfig(ctx context.Context, req *v0.WriteConfigRequest, opts ...grpc.CallOption) (*v0.WriteConfigResponse, error)
- func (sc *SmartClient) WriteSchema(ctx context.Context, req *v1alpha1.WriteSchemaRequest, opts ...grpc.CallOption) (*v1alpha1.WriteSchemaResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointConfig ¶
type EndpointConfig struct {
// contains filtered or unexported fields
}
EndpointConfig contains configuration for establishing connections with a specific backend service.
func NewEndpointConfig ¶
func NewEndpointConfig(serviceName, dnsName, token, caCertPath string) *EndpointConfig
NewEndpointConfig configures TLS protected backend connections.
func NewEndpointConfigNoTLS ¶
func NewEndpointConfigNoTLS(serviceName, dnsName, token string) *EndpointConfig
NewEndpointConfigNoTLS configures plaintext backend connections.
type EndpointResolverConfig ¶
type EndpointResolverConfig struct {
// contains filtered or unexported fields
}
EndpointResolverConfig contains configuration for establishing a connection to a dynamic endpoint resolver service.
func NewEndpointResolver ¶
func NewEndpointResolver(resolverEndpoint, caCertPath string) *EndpointResolverConfig
NewEndpointResolver configures a TLS protected endpoint resolver connection.
func NewEndpointResolverNoTLS ¶
func NewEndpointResolverNoTLS(resolverEndpoint string) *EndpointResolverConfig
NewEndpointResolverNoTLS configures a plaintext endpoint resolver connection.
type FallbackEndpointConfig ¶
type FallbackEndpointConfig struct {
// contains filtered or unexported fields
}
FallbackEndpointConfig contains configuration for a static fallback endpoint to be used when no resolved endpoints are available.
func NewFallbackEndpoint ¶
func NewFallbackEndpoint(endpoint, token, caCertPath string) *FallbackEndpointConfig
NewFallbackEndpoint configures a TLS protected fallback endpoint connection.
func NewFallbackEndpointNoTLS ¶
func NewFallbackEndpointNoTLS(endpoint, token string) *FallbackEndpointConfig
NewFallbackEndpointNoTLS configures a plaintext fallback endpoint connection.
func NoFallbackEndpoint ¶
func NoFallbackEndpoint() *FallbackEndpointConfig
NoFallbackEndpoint disables the fallback backend option.
type InsecureCreds ¶
func (InsecureCreds) GetRequestMetadata ¶
func (InsecureCreds) RequireTransportSecurity ¶
func (c InsecureCreds) RequireTransportSecurity() bool
type SmartClient ¶
type SmartClient struct {
// contains filtered or unexported fields
}
SmartClient is a client which utilizes a dynamic source of backends and a consistent hashring implementation for consistently calling the same backend for the same request.
func NewSmartClient ¶
func NewSmartClient( resolverConfig *EndpointResolverConfig, endpointConfig *EndpointConfig, fallback *FallbackEndpointConfig, ) (*SmartClient, error)
NewSmartClient creates an instance of the smart client with the specified configuration.
func (*SmartClient) Check ¶
func (sc *SmartClient) Check(ctx context.Context, req *v0.CheckRequest, opts ...grpc.CallOption) (*v0.CheckResponse, error)
func (*SmartClient) ContentChangeCheck ¶
func (sc *SmartClient) ContentChangeCheck(ctx context.Context, req *v0.ContentChangeCheckRequest, opts ...grpc.CallOption) (*v0.CheckResponse, error)
func (*SmartClient) Expand ¶
func (sc *SmartClient) Expand(ctx context.Context, req *v0.ExpandRequest, opts ...grpc.CallOption) (*v0.ExpandResponse, error)
func (*SmartClient) Lookup ¶
func (sc *SmartClient) Lookup(ctx context.Context, req *v0.LookupRequest, opts ...grpc.CallOption) (*v0.LookupResponse, error)
func (*SmartClient) Read ¶
func (sc *SmartClient) Read(ctx context.Context, req *v0.ReadRequest, opts ...grpc.CallOption) (*v0.ReadResponse, error)
func (*SmartClient) ReadConfig ¶
func (sc *SmartClient) ReadConfig(ctx context.Context, req *v0.ReadConfigRequest, opts ...grpc.CallOption) (*v0.ReadConfigResponse, error)
func (*SmartClient) ReadSchema ¶
func (sc *SmartClient) ReadSchema(ctx context.Context, req *v1alpha1.ReadSchemaRequest, opts ...grpc.CallOption) (*v1alpha1.ReadSchemaResponse, error)
func (*SmartClient) Stop ¶
func (sc *SmartClient) Stop()
Stop will cancel the client watch and clean up the pool
func (*SmartClient) Write ¶
func (sc *SmartClient) Write(ctx context.Context, req *v0.WriteRequest, opts ...grpc.CallOption) (*v0.WriteResponse, error)
func (*SmartClient) WriteConfig ¶
func (sc *SmartClient) WriteConfig(ctx context.Context, req *v0.WriteConfigRequest, opts ...grpc.CallOption) (*v0.WriteConfigResponse, error)
func (*SmartClient) WriteSchema ¶
func (sc *SmartClient) WriteSchema(ctx context.Context, req *v1alpha1.WriteSchemaRequest, opts ...grpc.CallOption) (*v1alpha1.WriteSchemaResponse, error)