Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type CallRequest
- func (*CallRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CallRequest) GetArguments() string
- func (x *CallRequest) GetEndpoint() string
- func (x *CallRequest) GetFd() string
- func (*CallRequest) ProtoMessage()
- func (x *CallRequest) ProtoReflect() protoreflect.Message
- func (x *CallRequest) Reset()
- func (x *CallRequest) String() string
- type CallResponse
- func (*CallResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CallResponse) GetError() string
- func (x *CallResponse) GetPayload() string
- func (x *CallResponse) GetStatus() Status
- func (*CallResponse) ProtoMessage()
- func (x *CallResponse) ProtoReflect() protoreflect.Message
- func (x *CallResponse) Reset()
- func (x *CallResponse) String() string
- type InitRequest
- type InitResponse
- type ServiceClient
- type ServiceServer
- type Status
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "OK", 1: "Error", } Status_value = map[string]int32{ "OK": 0, "Error": 1, } )
Enum value maps for Status.
var File_api_proto_v1_core_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "init", Handler: _Service_Init_Handler, }, { MethodName: "call", Handler: _Service_Call_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/proto/v1/core.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type CallRequest ¶
type CallRequest struct { Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // name of the endpoint Arguments string `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"` // arguments as json string Fd string `protobuf:"bytes,3,opt,name=fd,proto3" json:"fd,omitempty"` // file descriptor where to write call logs // contains filtered or unexported fields }
func (*CallRequest) Descriptor
deprecated
func (*CallRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallRequest.ProtoReflect.Descriptor instead.
func (*CallRequest) GetArguments ¶
func (x *CallRequest) GetArguments() string
func (*CallRequest) GetEndpoint ¶
func (x *CallRequest) GetEndpoint() string
func (*CallRequest) GetFd ¶
func (x *CallRequest) GetFd() string
func (*CallRequest) ProtoMessage ¶
func (*CallRequest) ProtoMessage()
func (*CallRequest) ProtoReflect ¶ added in v0.92.0
func (x *CallRequest) ProtoReflect() protoreflect.Message
func (*CallRequest) Reset ¶
func (x *CallRequest) Reset()
func (*CallRequest) String ¶
func (x *CallRequest) String() string
type CallResponse ¶
type CallResponse struct { Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=v1.Status" json:"status,omitempty"` // call flow status Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // error message Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // response payload encoded json // contains filtered or unexported fields }
func (*CallResponse) Descriptor
deprecated
func (*CallResponse) Descriptor() ([]byte, []int)
Deprecated: Use CallResponse.ProtoReflect.Descriptor instead.
func (*CallResponse) GetError ¶
func (x *CallResponse) GetError() string
func (*CallResponse) GetPayload ¶
func (x *CallResponse) GetPayload() string
func (*CallResponse) GetStatus ¶
func (x *CallResponse) GetStatus() Status
func (*CallResponse) ProtoMessage ¶
func (*CallResponse) ProtoMessage()
func (*CallResponse) ProtoReflect ¶ added in v0.92.0
func (x *CallResponse) ProtoReflect() protoreflect.Message
func (*CallResponse) Reset ¶
func (x *CallResponse) Reset()
func (*CallResponse) String ¶
func (x *CallResponse) String() string
type InitRequest ¶
type InitRequest struct {
// contains filtered or unexported fields
}
func (*InitRequest) Descriptor
deprecated
func (*InitRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.
func (*InitRequest) ProtoMessage ¶
func (*InitRequest) ProtoMessage()
func (*InitRequest) ProtoReflect ¶ added in v0.92.0
func (x *InitRequest) ProtoReflect() protoreflect.Message
func (*InitRequest) Reset ¶
func (x *InitRequest) Reset()
func (*InitRequest) String ¶
func (x *InitRequest) String() string
type InitResponse ¶
type InitResponse struct {
// contains filtered or unexported fields
}
func (*InitResponse) Descriptor
deprecated
func (*InitResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.
func (*InitResponse) ProtoMessage ¶
func (*InitResponse) ProtoMessage()
func (*InitResponse) ProtoReflect ¶ added in v0.92.0
func (x *InitResponse) ProtoReflect() protoreflect.Message
func (*InitResponse) Reset ¶
func (x *InitResponse) Reset()
func (*InitResponse) String ¶
func (x *InitResponse) String() string
type ServiceClient ¶
type ServiceClient interface { Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error) Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { Init(context.Context, *InitRequest) (*InitResponse, error) Call(context.Context, *CallRequest) (*CallResponse, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type Status ¶
type Status int32
func (Status) Descriptor ¶ added in v0.92.0
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶ added in v0.92.0
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶ added in v0.92.0
func (Status) Type() protoreflect.EnumType
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Call ¶
func (UnimplementedServiceServer) Call(context.Context, *CallRequest) (*CallResponse, error)
func (UnimplementedServiceServer) Init ¶
func (UnimplementedServiceServer) Init(context.Context, *InitRequest) (*InitResponse, error)
type UnsafeServiceServer ¶ added in v0.92.0
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.