Documentation ¶
Index ¶
- Constants
- func NewKvHandler(svc KvHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
- type KvClient
- type KvHandler
- type UnimplementedKvHandler
- func (UnimplementedKvHandler) Get(context.Context, *connect_go.Request[v1.GetRequest]) (*connect_go.Response[v1.GetResponse], error)
- func (UnimplementedKvHandler) GetByPrefix(context.Context, *connect_go.Request[v1.GetByPrefixRequest]) (*connect_go.Response[v1.GetByPrefixResponse], error)
- func (UnimplementedKvHandler) GetMany(context.Context, *connect_go.Request[v1.GetManyRequest]) (*connect_go.Response[v1.GetManyResponse], error)
- func (UnimplementedKvHandler) Scan(context.Context, *connect_go.Request[v1.ScanRequest]) (*connect_go.Response[v1.ScanResponse], error)
Constants ¶
const (
// KvName is the fully-qualified name of the Kv service.
KvName = "sf.substreams.sink.kv.v1.Kv"
)
Variables ¶
This section is empty.
Functions ¶
func NewKvHandler ¶
func NewKvHandler(svc KvHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
NewKvHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.
By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.
Types ¶
type KvClient ¶
type KvClient interface { // Get returns the requested value as bytes if it exists, grpc_error: NOT_FOUND otherwise. Get(context.Context, *connect_go.Request[v1.GetRequest]) (*connect_go.Response[v1.GetResponse], error) // GetMany returns the requested values as bytes if all of them exists, grpc_error: NOT_FOUND otherwise. GetMany(context.Context, *connect_go.Request[v1.GetManyRequest]) (*connect_go.Response[v1.GetManyResponse], error) // GetByPrefix returns the next _limit_ key/value pair that match the requested prefix if any exist, grpc_error: NOT_FOUND otherwise. GetByPrefix(context.Context, *connect_go.Request[v1.GetByPrefixRequest]) (*connect_go.Response[v1.GetByPrefixResponse], error) // Scan returns then next _limit_ key/value pairs starting lexicographically at the given key, grpc_error: NOT_FOUND otherwise. Scan(context.Context, *connect_go.Request[v1.ScanRequest]) (*connect_go.Response[v1.ScanResponse], error) }
KvClient is a client for the sf.substreams.sink.kv.v1.Kv service.
func NewKvClient ¶
func NewKvClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) KvClient
NewKvClient constructs a client for the sf.substreams.sink.kv.v1.Kv service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.
The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).
type KvHandler ¶
type KvHandler interface { // Get returns the requested value as bytes if it exists, grpc_error: NOT_FOUND otherwise. Get(context.Context, *connect_go.Request[v1.GetRequest]) (*connect_go.Response[v1.GetResponse], error) // GetMany returns the requested values as bytes if all of them exists, grpc_error: NOT_FOUND otherwise. GetMany(context.Context, *connect_go.Request[v1.GetManyRequest]) (*connect_go.Response[v1.GetManyResponse], error) // GetByPrefix returns the next _limit_ key/value pair that match the requested prefix if any exist, grpc_error: NOT_FOUND otherwise. GetByPrefix(context.Context, *connect_go.Request[v1.GetByPrefixRequest]) (*connect_go.Response[v1.GetByPrefixResponse], error) // Scan returns then next _limit_ key/value pairs starting lexicographically at the given key, grpc_error: NOT_FOUND otherwise. Scan(context.Context, *connect_go.Request[v1.ScanRequest]) (*connect_go.Response[v1.ScanResponse], error) }
KvHandler is an implementation of the sf.substreams.sink.kv.v1.Kv service.
type UnimplementedKvHandler ¶
type UnimplementedKvHandler struct{}
UnimplementedKvHandler returns CodeUnimplemented from all methods.
func (UnimplementedKvHandler) Get ¶
func (UnimplementedKvHandler) Get(context.Context, *connect_go.Request[v1.GetRequest]) (*connect_go.Response[v1.GetResponse], error)
func (UnimplementedKvHandler) GetByPrefix ¶
func (UnimplementedKvHandler) GetByPrefix(context.Context, *connect_go.Request[v1.GetByPrefixRequest]) (*connect_go.Response[v1.GetByPrefixResponse], error)
func (UnimplementedKvHandler) GetMany ¶
func (UnimplementedKvHandler) GetMany(context.Context, *connect_go.Request[v1.GetManyRequest]) (*connect_go.Response[v1.GetManyResponse], error)
func (UnimplementedKvHandler) Scan ¶
func (UnimplementedKvHandler) Scan(context.Context, *connect_go.Request[v1.ScanRequest]) (*connect_go.Response[v1.ScanResponse], error)