Documentation ¶
Overview ¶
Package scribe is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterScribeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterScribeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ScribeClient) error
- func RegisterScribeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterScribeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ScribeServer) error
- func RegisterScribeServer(s grpc.ServiceRegistrar, srv ScribeServer)
- type ScribeClient
- type ScribeServer
- type Scribe_WriteBatchClient
- type Scribe_WriteBatchServer
- type UnimplementedScribeServer
- type UnsafeScribeServer
- type WriteBatchRequest
- func (*WriteBatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WriteBatchRequest) GetBatch() []*anypb.Any
- func (x *WriteBatchRequest) GetId() string
- func (*WriteBatchRequest) ProtoMessage()
- func (x *WriteBatchRequest) ProtoReflect() protoreflect.Message
- func (x *WriteBatchRequest) Reset()
- func (x *WriteBatchRequest) String() string
- type WriteBatchResponse
- func (*WriteBatchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WriteBatchResponse) GetAck() bool
- func (x *WriteBatchResponse) GetId() string
- func (*WriteBatchResponse) ProtoMessage()
- func (x *WriteBatchResponse) ProtoReflect() protoreflect.Message
- func (x *WriteBatchResponse) Reset()
- func (x *WriteBatchResponse) String() string
Constants ¶
const (
Scribe_WriteBatch_FullMethodName = "/aserto.scribe.v2.Scribe/WriteBatch"
)
Variables ¶
var File_aserto_scribe_v2_scribe_proto protoreflect.FileDescriptor
var Scribe_ServiceDesc = grpc.ServiceDesc{ ServiceName: "aserto.scribe.v2.Scribe", HandlerType: (*ScribeServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "WriteBatch", Handler: _Scribe_WriteBatch_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "aserto/scribe/v2/scribe.proto", }
Scribe_ServiceDesc is the grpc.ServiceDesc for Scribe service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterScribeHandler ¶
RegisterScribeHandler registers the http handlers for service Scribe to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterScribeHandlerClient ¶
func RegisterScribeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ScribeClient) error
RegisterScribeHandlerClient registers the http handlers for service Scribe to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ScribeClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ScribeClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ScribeClient" to call the correct interceptors.
func RegisterScribeHandlerFromEndpoint ¶
func RegisterScribeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterScribeHandlerFromEndpoint is same as RegisterScribeHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterScribeHandlerServer ¶
func RegisterScribeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ScribeServer) error
RegisterScribeHandlerServer registers the http handlers for service Scribe to "mux". UnaryRPC :call ScribeServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterScribeHandlerFromEndpoint instead.
func RegisterScribeServer ¶
func RegisterScribeServer(s grpc.ServiceRegistrar, srv ScribeServer)
Types ¶
type ScribeClient ¶
type ScribeClient interface {
WriteBatch(ctx context.Context, opts ...grpc.CallOption) (Scribe_WriteBatchClient, error)
}
ScribeClient is the client API for Scribe service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewScribeClient ¶
func NewScribeClient(cc grpc.ClientConnInterface) ScribeClient
type ScribeServer ¶
type ScribeServer interface {
WriteBatch(Scribe_WriteBatchServer) error
}
ScribeServer is the server API for Scribe service. All implementations should embed UnimplementedScribeServer for forward compatibility
type Scribe_WriteBatchClient ¶
type Scribe_WriteBatchClient interface { Send(*WriteBatchRequest) error Recv() (*WriteBatchResponse, error) grpc.ClientStream }
type Scribe_WriteBatchServer ¶
type Scribe_WriteBatchServer interface { Send(*WriteBatchResponse) error Recv() (*WriteBatchRequest, error) grpc.ServerStream }
type UnimplementedScribeServer ¶
type UnimplementedScribeServer struct { }
UnimplementedScribeServer should be embedded to have forward compatible implementations.
func (UnimplementedScribeServer) WriteBatch ¶
func (UnimplementedScribeServer) WriteBatch(Scribe_WriteBatchServer) error
type UnsafeScribeServer ¶
type UnsafeScribeServer interface {
// contains filtered or unexported methods
}
UnsafeScribeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScribeServer will result in compilation errors.
type WriteBatchRequest ¶
type WriteBatchRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Batch []*anypb.Any `protobuf:"bytes,2,rep,name=batch,proto3" json:"batch,omitempty"` // contains filtered or unexported fields }
func (*WriteBatchRequest) Descriptor
deprecated
func (*WriteBatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use WriteBatchRequest.ProtoReflect.Descriptor instead.
func (*WriteBatchRequest) GetBatch ¶
func (x *WriteBatchRequest) GetBatch() []*anypb.Any
func (*WriteBatchRequest) GetId ¶
func (x *WriteBatchRequest) GetId() string
func (*WriteBatchRequest) ProtoMessage ¶
func (*WriteBatchRequest) ProtoMessage()
func (*WriteBatchRequest) ProtoReflect ¶
func (x *WriteBatchRequest) ProtoReflect() protoreflect.Message
func (*WriteBatchRequest) Reset ¶
func (x *WriteBatchRequest) Reset()
func (*WriteBatchRequest) String ¶
func (x *WriteBatchRequest) String() string
type WriteBatchResponse ¶
type WriteBatchResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Ack bool `protobuf:"varint,2,opt,name=ack,proto3" json:"ack,omitempty"` // contains filtered or unexported fields }
func (*WriteBatchResponse) Descriptor
deprecated
func (*WriteBatchResponse) Descriptor() ([]byte, []int)
Deprecated: Use WriteBatchResponse.ProtoReflect.Descriptor instead.
func (*WriteBatchResponse) GetAck ¶
func (x *WriteBatchResponse) GetAck() bool
func (*WriteBatchResponse) GetId ¶
func (x *WriteBatchResponse) GetId() string
func (*WriteBatchResponse) ProtoMessage ¶
func (*WriteBatchResponse) ProtoMessage()
func (*WriteBatchResponse) ProtoReflect ¶
func (x *WriteBatchResponse) ProtoReflect() protoreflect.Message
func (*WriteBatchResponse) Reset ¶
func (x *WriteBatchResponse) Reset()
func (*WriteBatchResponse) String ¶
func (x *WriteBatchResponse) String() string