Documentation ¶
Index ¶
- Constants
- type CRDTOperationTargetFn
- type Client
- func (c *Client) AddAfterShutdownHandler(handler func(ctx context.Context))
- func (c *Client) AddBeforeShutdownHandler(handler func(ctx context.Context))
- func (c *Client) Name() string
- func (c *Client) Shutdown(ctx context.Context) error
- func (c *Client) Start(ctx context.Context) error
- func (c *Client) State() int32
- type Config
- type Invoker
- func (iv *Invoker) CB() *cb.CircuitBreaker
- func (iv *Invoker) Factory() *cluster.ConnectionInvocationFactory
- func (iv *Invoker) InvokeOnConnection(ctx context.Context, req *proto.ClientMessage, conn *cluster.Connection) (*proto.ClientMessage, error)
- func (iv *Invoker) InvokeOnConnectionWithHandler(ctx context.Context, req *proto.ClientMessage, conn *cluster.Connection, ...) (*proto.ClientMessage, error)
- func (iv *Invoker) InvokeOnMemberCRDT(ctx context.Context, ...) (*proto.ClientMessage, error)
- func (iv *Invoker) InvokeOnPartition(ctx context.Context, request *proto.ClientMessage, partitionID int32) (*proto.ClientMessage, error)
- func (iv *Invoker) InvokeOnPartitionAsync(ctx context.Context, request *proto.ClientMessage, partitionID int32, ...) (invocation.Invocation, error)
- func (iv *Invoker) InvokeOnRandomTarget(ctx context.Context, request *proto.ClientMessage, ...) (*proto.ClientMessage, error)
- func (iv *Invoker) InvokeUrgentOnRandomTarget(ctx context.Context, request *proto.ClientMessage, ...) (*proto.ClientMessage, error)
- func (iv *Invoker) SendInvocation(ctx context.Context, inv invocation.Invocation) error
- func (iv *Invoker) TryInvoke(ctx context.Context, f cb.TryHandler) (*proto.ClientMessage, error)
Constants ¶
View Source
const ( Created int32 = iota Starting Ready Stopping Stopped )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRDTOperationTargetFn ¶ added in v1.4.0
type CRDTOperationTargetFn func(excluded map[types.UUID]struct{}) (*pubcluster.MemberInfo, []proto.Pair)
type Client ¶
type Client struct { InvocationHandler invocation.Handler Logger ilogger.LogAdaptor ConnectionManager *icluster.ConnectionManager ViewListenerService *icluster.ViewListenerService InvocationService *invocation.Service InvocationFactory *icluster.ConnectionInvocationFactory SerializationService *serialization.Service EventDispatcher *event.DispatchService StatsService *stats.Service PartitionService *icluster.PartitionService ClusterService *icluster.Service Invoker *Invoker // contains filtered or unexported fields }
func (*Client) AddAfterShutdownHandler ¶ added in v1.3.1
func (*Client) AddBeforeShutdownHandler ¶ added in v1.3.1
func (*Client) Name ¶
Name returns client's name. Use config.Name to set the client name. If not set manually, an automatically generated name is used.
type Config ¶
type Invoker ¶ added in v1.4.0
type Invoker struct {
// contains filtered or unexported fields
}
func NewInvoker ¶ added in v1.4.0
func NewInvoker(factory *cluster.ConnectionInvocationFactory, svc *invocation.Service, lg *logger.LogAdaptor) *Invoker
func (*Invoker) CB ¶ added in v1.4.0
func (iv *Invoker) CB() *cb.CircuitBreaker
func (*Invoker) Factory ¶ added in v1.4.0
func (iv *Invoker) Factory() *cluster.ConnectionInvocationFactory
func (*Invoker) InvokeOnConnection ¶ added in v1.4.0
func (iv *Invoker) InvokeOnConnection(ctx context.Context, req *proto.ClientMessage, conn *cluster.Connection) (*proto.ClientMessage, error)
func (*Invoker) InvokeOnConnectionWithHandler ¶ added in v1.4.0
func (iv *Invoker) InvokeOnConnectionWithHandler(ctx context.Context, req *proto.ClientMessage, conn *cluster.Connection, handler proto.ClientMessageHandler) (*proto.ClientMessage, error)
func (*Invoker) InvokeOnMemberCRDT ¶ added in v1.4.0
func (iv *Invoker) InvokeOnMemberCRDT(ctx context.Context, makeReq func(target types.UUID, clocks []proto.Pair) *proto.ClientMessage, crdtFn CRDTOperationTargetFn) (*proto.ClientMessage, error)
func (*Invoker) InvokeOnPartition ¶ added in v1.4.0
func (iv *Invoker) InvokeOnPartition(ctx context.Context, request *proto.ClientMessage, partitionID int32) (*proto.ClientMessage, error)
func (*Invoker) InvokeOnPartitionAsync ¶ added in v1.4.0
func (iv *Invoker) InvokeOnPartitionAsync(ctx context.Context, request *proto.ClientMessage, partitionID int32, now time.Time) (invocation.Invocation, error)
func (*Invoker) InvokeOnRandomTarget ¶ added in v1.4.0
func (iv *Invoker) InvokeOnRandomTarget(ctx context.Context, request *proto.ClientMessage, handler proto.ClientMessageHandler) (*proto.ClientMessage, error)
func (*Invoker) InvokeUrgentOnRandomTarget ¶ added in v1.4.0
func (iv *Invoker) InvokeUrgentOnRandomTarget(ctx context.Context, request *proto.ClientMessage, handler proto.ClientMessageHandler) (*proto.ClientMessage, error)
func (*Invoker) SendInvocation ¶ added in v1.4.0
func (iv *Invoker) SendInvocation(ctx context.Context, inv invocation.Invocation) error
func (*Invoker) TryInvoke ¶ added in v1.4.0
func (iv *Invoker) TryInvoke(ctx context.Context, f cb.TryHandler) (*proto.ClientMessage, error)
Click to show internal directories.
Click to hide internal directories.