Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterHTTPForkJoinServiceServer(s grpc.ServiceRegistrar, srv HTTPForkJoinServiceServer)
- func RequestID(ctx context.Context) string
- type AUTHENTICATION
- type BasicAuthCredentials
- type DispatchServer
- type DispatchWorker
- type Error
- type ErrorCode
- type HTTPForkJoinServiceClient
- type HTTPForkJoinServiceServer
- type HTTPForkJoinService_FanoutFaninClient
- type HTTPForkJoinService_FanoutFaninServer
- type HTTPMessage
- type HTTPRequest
- type HTTPResponse
- type METHOD
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetActiveDeadLineSeconds() uint32
- func (x *Message) GetAuthentication() Message_Authentication
- func (x *Message) GetBasicAuthcredentials() *Message_BasicAuthCredentials
- func (x *Message) GetHeaders() map[string]string
- func (x *Message) GetId() string
- func (x *Message) GetMethod() Message_Method
- func (x *Message) GetMutualAuthCredentials() *Message_MutualAuthCredentials
- func (x *Message) GetPayload() string
- func (x *Message) GetStatusCode() uint32
- func (x *Message) GetURL() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Message_Authentication
- func (Message_Authentication) Descriptor() protoreflect.EnumDescriptor
- func (x Message_Authentication) Enum() *Message_Authentication
- func (Message_Authentication) EnumDescriptor() ([]byte, []int)deprecated
- func (x Message_Authentication) Number() protoreflect.EnumNumber
- func (x Message_Authentication) String() string
- func (Message_Authentication) Type() protoreflect.EnumType
- type Message_BasicAuthCredentials
- func (*Message_BasicAuthCredentials) Descriptor() ([]byte, []int)deprecated
- func (x *Message_BasicAuthCredentials) GetPassword() string
- func (x *Message_BasicAuthCredentials) GetServerCertificate() string
- func (x *Message_BasicAuthCredentials) GetUserName() string
- func (*Message_BasicAuthCredentials) ProtoMessage()
- func (x *Message_BasicAuthCredentials) ProtoReflect() protoreflect.Message
- func (x *Message_BasicAuthCredentials) Reset()
- func (x *Message_BasicAuthCredentials) String() string
- type Message_Method
- func (Message_Method) Descriptor() protoreflect.EnumDescriptor
- func (x Message_Method) Enum() *Message_Method
- func (Message_Method) EnumDescriptor() ([]byte, []int)deprecated
- func (x Message_Method) Number() protoreflect.EnumNumber
- func (x Message_Method) String() string
- func (Message_Method) Type() protoreflect.EnumType
- type Message_MutualAuthCredentials
- func (*Message_MutualAuthCredentials) Descriptor() ([]byte, []int)deprecated
- func (x *Message_MutualAuthCredentials) GetCACertificate() string
- func (x *Message_MutualAuthCredentials) GetClientCertificate() string
- func (x *Message_MutualAuthCredentials) GetClientKey() string
- func (*Message_MutualAuthCredentials) ProtoMessage()
- func (x *Message_MutualAuthCredentials) ProtoReflect() protoreflect.Message
- func (x *Message_MutualAuthCredentials) Reset()
- func (x *Message_MutualAuthCredentials) String() string
- type MutualAuthCredentials
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetApi() string
- func (x *Request) GetId() string
- func (x *Request) GetMessages() []*Message
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetErrors() []*Error
- func (x *Response) GetId() string
- func (x *Response) GetMessage() *Message
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type UnimplementedHTTPForkJoinServiceServer
- type UnsafeHTTPForkJoinServiceServer
Constants ¶
const (
CtxRequestID ctxKey = iota
)
Variables ¶
var ( ErrorCode_name = map[int32]string{ 0: "InternalError", 1: "RequestError", 2: "ResponseError", 3: "ConnectionError", 4: "ConcurrencyContextError", 5: "RequestAborted", 6: "AuthenticationError", } ErrorCode_value = map[string]int32{ "InternalError": 0, "RequestError": 1, "ResponseError": 2, "ConnectionError": 3, "ConcurrencyContextError": 4, "RequestAborted": 5, "AuthenticationError": 6, } )
Enum value maps for ErrorCode.
var ( Message_Method_name = map[int32]string{ 0: "NIL", 1: "GET", 2: "POST", 3: "PUT", 4: "PATCH", } Message_Method_value = map[string]int32{ "NIL": 0, "GET": 1, "POST": 2, "PUT": 3, "PATCH": 4, } )
Enum value maps for Message_Method.
var ( Message_Authentication_name = map[int32]string{ 0: "NONE", 1: "BASIC", 2: "MUTUAL", } Message_Authentication_value = map[string]int32{ "NONE": 0, "BASIC": 1, "MUTUAL": 2, } )
Enum value maps for Message_Authentication.
var File_api_httpforkjoin_proto protoreflect.FileDescriptor
var HTTPForkJoinService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "http.HTTPForkJoinService", HandlerType: (*HTTPForkJoinServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "FanoutFanin", Handler: _HTTPForkJoinService_FanoutFanin_Handler, ServerStreams: true, }, }, Metadata: "api/httpforkjoin.proto", }
HTTPForkJoinService_ServiceDesc is the grpc.ServiceDesc for HTTPForkJoinService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHTTPForkJoinServiceServer ¶
func RegisterHTTPForkJoinServiceServer(s grpc.ServiceRegistrar, srv HTTPForkJoinServiceServer)
Types ¶
type AUTHENTICATION ¶
type AUTHENTICATION string
TODO: Is this type required?
const ( NONE AUTHENTICATION = "NONE" BASIC AUTHENTICATION = "BASIC" MUTUAL AUTHENTICATION = "MUTUAL" )
type BasicAuthCredentials ¶
type DispatchServer ¶
type DispatchServer struct {
UnimplementedHTTPForkJoinServiceServer
}
DispatchServer implements GRPC server interface FannoutFannin
func (*DispatchServer) FanoutFanin ¶
func (s *DispatchServer) FanoutFanin(request *Request, stream HTTPForkJoinService_FanoutFaninServer) error
FanoutFanin Fans out each http message to http dispatch works using the fork join interface
type DispatchWorker ¶
type DispatchWorker struct { Request HTTPRequest // contains filtered or unexported fields }
DispatchWorker dispatches to the configured URL
func (*DispatchWorker) ActiveDeadLineSeconds ¶
func (hdw *DispatchWorker) ActiveDeadLineSeconds() uint32
type Error ¶
type Error struct { Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=http.ErrorCode" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type ErrorCode ¶
type ErrorCode int32
func (ErrorCode) Descriptor ¶
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
func (ErrorCode) Number ¶
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶
func (ErrorCode) Type() protoreflect.EnumType
type HTTPForkJoinServiceClient ¶
type HTTPForkJoinServiceClient interface {
FanoutFanin(ctx context.Context, in *Request, opts ...grpc.CallOption) (HTTPForkJoinService_FanoutFaninClient, error)
}
HTTPForkJoinServiceClient is the client API for HTTPForkJoinService 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 NewHTTPForkJoinServiceClient ¶
func NewHTTPForkJoinServiceClient(cc grpc.ClientConnInterface) HTTPForkJoinServiceClient
type HTTPForkJoinServiceServer ¶
type HTTPForkJoinServiceServer interface { FanoutFanin(*Request, HTTPForkJoinService_FanoutFaninServer) error // contains filtered or unexported methods }
HTTPForkJoinServiceServer is the server API for HTTPForkJoinService service. All implementations must embed UnimplementedHTTPForkJoinServiceServer for forward compatibility
type HTTPForkJoinService_FanoutFaninClient ¶
type HTTPForkJoinService_FanoutFaninClient interface { Recv() (*Response, error) grpc.ClientStream }
type HTTPForkJoinService_FanoutFaninServer ¶
type HTTPForkJoinService_FanoutFaninServer interface { Send(*Response) error grpc.ServerStream }
type HTTPMessage ¶
type HTTPMessage struct { ID string URL string Method METHOD Payload string Headers map[string]string ActiveDeadLine uint32 StatusCode int Authentication AUTHENTICATION BasicAtuhCredentials BasicAuthCredentials MutualAuthCredentials MutualAuthCredentials }
HTTPMessage URL and method to be dispatched too
func (*HTTPMessage) Add ¶
func (hm *HTTPMessage) Add(key, value string)
Add adds headers to messsage
type HTTPRequest ¶
type HTTPRequest struct { ID string Message HTTPMessage }
HTTPRequest URL and method to be dispatched too
type HTTPResponse ¶
type HTTPResponse struct {
Message HTTPMessage
}
HTTPResponse URL and method to be dispatched too
type Message ¶
type Message struct { URL string `protobuf:"bytes,1,opt,name=URL,proto3" json:"URL,omitempty"` Method Message_Method `protobuf:"varint,3,opt,name=method,proto3,enum=http.Message_Method" json:"method,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ Payload string `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` StatusCode uint32 `protobuf:"varint,6,opt,name=statusCode,proto3" json:"statusCode,omitempty"` Id string `protobuf:"bytes,7,opt,name=Id,proto3" json:"Id,omitempty"` ActiveDeadLineSeconds uint32 `protobuf:"varint,8,opt,name=activeDeadLineSeconds,proto3" json:"activeDeadLineSeconds,omitempty"` Authentication Message_Authentication `protobuf:"varint,9,opt,name=authentication,proto3,enum=http.Message_Authentication" json:"authentication,omitempty"` BasicAuthcredentials *Message_BasicAuthCredentials `protobuf:"bytes,10,opt,name=basicAuthcredentials,proto3" json:"basicAuthcredentials,omitempty"` MutualAuthCredentials *Message_MutualAuthCredentials `protobuf:"bytes,11,opt,name=mutualAuthCredentials,proto3" json:"mutualAuthCredentials,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetActiveDeadLineSeconds ¶
func (*Message) GetAuthentication ¶
func (x *Message) GetAuthentication() Message_Authentication
func (*Message) GetBasicAuthcredentials ¶
func (x *Message) GetBasicAuthcredentials() *Message_BasicAuthCredentials
func (*Message) GetHeaders ¶
func (*Message) GetMethod ¶
func (x *Message) GetMethod() Message_Method
func (*Message) GetMutualAuthCredentials ¶
func (x *Message) GetMutualAuthCredentials() *Message_MutualAuthCredentials
func (*Message) GetPayload ¶
func (*Message) GetStatusCode ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Message_Authentication ¶
type Message_Authentication int32
const ( Message_NONE Message_Authentication = 0 Message_BASIC Message_Authentication = 1 Message_MUTUAL Message_Authentication = 2 )
func (Message_Authentication) Descriptor ¶
func (Message_Authentication) Descriptor() protoreflect.EnumDescriptor
func (Message_Authentication) Enum ¶
func (x Message_Authentication) Enum() *Message_Authentication
func (Message_Authentication) EnumDescriptor
deprecated
func (Message_Authentication) EnumDescriptor() ([]byte, []int)
Deprecated: Use Message_Authentication.Descriptor instead.
func (Message_Authentication) Number ¶
func (x Message_Authentication) Number() protoreflect.EnumNumber
func (Message_Authentication) String ¶
func (x Message_Authentication) String() string
func (Message_Authentication) Type ¶
func (Message_Authentication) Type() protoreflect.EnumType
type Message_BasicAuthCredentials ¶
type Message_BasicAuthCredentials struct { UserName string `protobuf:"bytes,1,opt,name=UserName,proto3" json:"UserName,omitempty"` Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"` ServerCertificate string `protobuf:"bytes,3,opt,name=ServerCertificate,proto3" json:"ServerCertificate,omitempty"` // contains filtered or unexported fields }
func (*Message_BasicAuthCredentials) Descriptor
deprecated
func (*Message_BasicAuthCredentials) Descriptor() ([]byte, []int)
Deprecated: Use Message_BasicAuthCredentials.ProtoReflect.Descriptor instead.
func (*Message_BasicAuthCredentials) GetPassword ¶
func (x *Message_BasicAuthCredentials) GetPassword() string
func (*Message_BasicAuthCredentials) GetServerCertificate ¶
func (x *Message_BasicAuthCredentials) GetServerCertificate() string
func (*Message_BasicAuthCredentials) GetUserName ¶
func (x *Message_BasicAuthCredentials) GetUserName() string
func (*Message_BasicAuthCredentials) ProtoMessage ¶
func (*Message_BasicAuthCredentials) ProtoMessage()
func (*Message_BasicAuthCredentials) ProtoReflect ¶
func (x *Message_BasicAuthCredentials) ProtoReflect() protoreflect.Message
func (*Message_BasicAuthCredentials) Reset ¶
func (x *Message_BasicAuthCredentials) Reset()
func (*Message_BasicAuthCredentials) String ¶
func (x *Message_BasicAuthCredentials) String() string
type Message_Method ¶
type Message_Method int32
const ( Message_NIL Message_Method = 0 Message_GET Message_Method = 1 Message_POST Message_Method = 2 Message_PUT Message_Method = 3 Message_PATCH Message_Method = 4 )
func (Message_Method) Descriptor ¶
func (Message_Method) Descriptor() protoreflect.EnumDescriptor
func (Message_Method) Enum ¶
func (x Message_Method) Enum() *Message_Method
func (Message_Method) EnumDescriptor
deprecated
func (Message_Method) EnumDescriptor() ([]byte, []int)
Deprecated: Use Message_Method.Descriptor instead.
func (Message_Method) Number ¶
func (x Message_Method) Number() protoreflect.EnumNumber
func (Message_Method) String ¶
func (x Message_Method) String() string
func (Message_Method) Type ¶
func (Message_Method) Type() protoreflect.EnumType
type Message_MutualAuthCredentials ¶
type Message_MutualAuthCredentials struct { ClientCertificate string `protobuf:"bytes,1,opt,name=ClientCertificate,proto3" json:"ClientCertificate,omitempty"` ClientKey string `protobuf:"bytes,2,opt,name=ClientKey,proto3" json:"ClientKey,omitempty"` CACertificate string `protobuf:"bytes,3,opt,name=CACertificate,proto3" json:"CACertificate,omitempty"` // contains filtered or unexported fields }
func (*Message_MutualAuthCredentials) Descriptor
deprecated
func (*Message_MutualAuthCredentials) Descriptor() ([]byte, []int)
Deprecated: Use Message_MutualAuthCredentials.ProtoReflect.Descriptor instead.
func (*Message_MutualAuthCredentials) GetCACertificate ¶
func (x *Message_MutualAuthCredentials) GetCACertificate() string
func (*Message_MutualAuthCredentials) GetClientCertificate ¶
func (x *Message_MutualAuthCredentials) GetClientCertificate() string
func (*Message_MutualAuthCredentials) GetClientKey ¶
func (x *Message_MutualAuthCredentials) GetClientKey() string
func (*Message_MutualAuthCredentials) ProtoMessage ¶
func (*Message_MutualAuthCredentials) ProtoMessage()
func (*Message_MutualAuthCredentials) ProtoReflect ¶
func (x *Message_MutualAuthCredentials) ProtoReflect() protoreflect.Message
func (*Message_MutualAuthCredentials) Reset ¶
func (x *Message_MutualAuthCredentials) Reset()
func (*Message_MutualAuthCredentials) String ¶
func (x *Message_MutualAuthCredentials) String() string
type MutualAuthCredentials ¶
type Request ¶
type Request struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"` Id string `protobuf:"bytes,3,opt,name=Id,proto3" json:"Id,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetMessages ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Errors []*Error `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` Id string `protobuf:"bytes,3,opt,name=Id,proto3" json:"Id,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedHTTPForkJoinServiceServer ¶
type UnimplementedHTTPForkJoinServiceServer struct { }
UnimplementedHTTPForkJoinServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHTTPForkJoinServiceServer) FanoutFanin ¶
func (UnimplementedHTTPForkJoinServiceServer) FanoutFanin(*Request, HTTPForkJoinService_FanoutFaninServer) error
type UnsafeHTTPForkJoinServiceServer ¶
type UnsafeHTTPForkJoinServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHTTPForkJoinServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HTTPForkJoinServiceServer will result in compilation errors.