Documentation ¶
Index ¶
- func ContextAddInvolvedOperator(ctx context.Context, name, id string) context.Context
- func ContextWithInvolvedOperators(ctx context.Context, operators map[string]map[string]bool) context.Context
- func ContextWithOperationID(ctx context.Context, operationID string) context.Context
- func InvolvedOperatorsFromContext(ctx context.Context) map[string]map[string]bool
- func TransactionIDFromContext(ctx context.Context, callID string) string
- type Client
- type Executor
- type HandlerFactory
- type HandlerFactoryMapping
- type Method
- type Operator
- type OperatorClient
- type OperatorHandler
- type ProxyFactory
- type ProxyFactoryMapping
- type Publisher
- type Request
- type RequestHandler
- type Response
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextAddInvolvedOperator ¶
ContextAddInvolvedOperator mutates context's set of involved operators.
func ContextWithOperationID ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(mapping ProxyFactoryMapping, publisher Publisher) *Client
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(storage Storage, client OperatorClient) *Executor
type HandlerFactory ¶
type HandlerFactory func(id string) OperatorHandler
type HandlerFactoryMapping ¶
type HandlerFactoryMapping map[string]HandlerFactory
ProxyFactoryMapping maps type names to OperatorFactories.
type Operator ¶
type Operator interface {
ID() string
}
Operator is the minimal interface for all operators.
type OperatorClient ¶
type OperatorHandler ¶
type OperatorHandler interface {
Handle(context.Context, OperatorClient, *Request) ([]byte, error)
}
OperatorHandler handles calls to the methods of an operator.
It will convert an OperatorCall to a method call and convert the result to a Result struct.
type ProxyFactory ¶
type ProxyFactory func(id string, client OperatorClient) Operator
ProxyFactory instantiates a OperatorProxy value.
Used by the OperatorClient to instantiate an operator to an OperatorProxy, so method calls can be proxied to the actual implementation.
type ProxyFactoryMapping ¶
type ProxyFactoryMapping map[string]ProxyFactory
ProxyFactoryMapping maps type names to OperatorFactories.
type Request ¶
type Request struct { TransactionID string `json:"o"` RequestID string `json:"r"` TypeName string `json:"n"` InstanceID string `json:"i"` Method string `json:"m"` Args []byte `json:"a"` }
Click to show internal directories.
Click to hide internal directories.