Documentation ¶
Index ¶
- Variables
- type Handler
- type Impl
- func (i *Impl) Address() *pubcluster.AddressImpl
- func (i *Impl) CanRetry(err error) bool
- func (i *Impl) Close()
- func (i *Impl) Complete(message *proto.ClientMessage)
- func (i *Impl) Completed() bool
- func (i *Impl) EventHandler() proto.ClientMessageHandler
- func (i *Impl) Get() (*proto.ClientMessage, error)
- func (i *Impl) GetWithContext(ctx context.Context) (*proto.ClientMessage, error)
- func (i *Impl) PartitionID() int32
- func (i *Impl) Request() *proto.ClientMessage
- func (i *Impl) SetEventHandler(handler proto.ClientMessageHandler)
- type Invocation
- type Result
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrResponseChannelClosed = errors.New("response channel closed")
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
Invoke(invocation Invocation) error
}
type Impl ¶
type Impl struct {
// contains filtered or unexported fields
}
func NewImpl ¶
func NewImpl(clientMessage *proto.ClientMessage, partitionID int32, address *pubcluster.AddressImpl, deadline time.Time, redoOperation bool) *Impl
func (*Impl) Address ¶
func (i *Impl) Address() *pubcluster.AddressImpl
func (*Impl) Complete ¶
func (i *Impl) Complete(message *proto.ClientMessage)
func (*Impl) EventHandler ¶
func (i *Impl) EventHandler() proto.ClientMessageHandler
func (*Impl) GetWithContext ¶
func (*Impl) PartitionID ¶
func (*Impl) Request ¶
func (i *Impl) Request() *proto.ClientMessage
func (*Impl) SetEventHandler ¶
func (i *Impl) SetEventHandler(handler proto.ClientMessageHandler)
SetEventHandler sets the event handler for the invocation. It should only be called at the site of creation.
type Invocation ¶
type Invocation interface { Complete(message *proto.ClientMessage) Completed() bool EventHandler() proto.ClientMessageHandler Get() (*proto.ClientMessage, error) GetWithContext(ctx context.Context) (*proto.ClientMessage, error) PartitionID() int32 Request() *proto.ClientMessage Address() *pubcluster.AddressImpl Close() CanRetry(err error) bool }
type Result ¶
type Result interface { Get() (*proto.ClientMessage, error) GetWithTimeout(duration time.Duration) (*proto.ClientMessage, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( requestCh <-chan Invocation, responseCh <-chan *proto.ClientMessage, removeCh <-chan int64, handler Handler, logger ilogger.Logger) *Service
func (*Service) SetHandler ¶
Click to show internal directories.
Click to hide internal directories.