Documentation ¶
Overview ¶
Package reply represents responses to messages of the messagebus
Index ¶
- Constants
- func Deserialize(buff io.Reader) (core.Reply, error)
- func Serialize(reply core.Reply) (io.Reader, error)
- func ToBytes(rep core.Reply) []byte
- type CallConstructor
- type CallMethod
- type Children
- type Code
- type Delegate
- type ErrType
- type Error
- type GetChildrenRedirectReply
- type GetCodeRedirectReply
- type GetObjectRedirectReply
- type HasPendingRequests
- type HeavyError
- type ID
- type Jet
- type JetMiss
- type NodeSign
- type NodeSignInt
- type NotOK
- type OK
- type Object
- type ObjectIndex
- type RegisterRequest
Constants ¶
const ( // TypeError is reply with error. TypeError = core.ReplyType(iota + 1) // TypeOK is a generic reply for signaling a positive result. TypeOK // TypeNotOK is a generic reply for signaling a negative result. TypeNotOK TypeGetCodeRedirect TypeGetObjectRedirect TypeGetChildrenRedirect // TypeCallMethod - two binary fields: data and results. TypeCallMethod // TypeCallConstructor - reference on created object TypeCallConstructor // TypeRegisterRequest - request for execution was registered TypeRegisterRequest // TypeCode is code from storage. TypeCode // TypeObject is object from storage. TypeObject // TypeDelegate is delegate reference from storage. TypeDelegate // TypeID is common reply for methods returning id to lifeline states. TypeID // TypeChildren is a reply for fetching objects children in chunks. TypeChildren // TypeObjectIndex contains serialized object index. It can be stored in DB without processing. TypeObjectIndex // TypeJetMiss is returned for miscalculated jets due to incomplete jet tree. TypeJetMiss // TypePendingRequests contains unclosed requests for an object. TypePendingRequests // TypeJet contains jet. TypeJet // TypeHeavyError carries heavy record sync TypeHeavyError TypeNodeSign )
const ( // ErrDeactivated returned when requested object is deactivated. ErrDeactivated = iota + 1 ErrStateNotAvailable ErrHotDataTimeout )
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
Deserialize returns decoded reply.
Types ¶
type CallConstructor ¶ added in v0.5.0
func (*CallConstructor) Type ¶ added in v0.5.0
func (r *CallConstructor) Type() core.ReplyType
Type returns type of the reply
type CallMethod ¶ added in v0.5.0
CallMethod - the most common reply
func (*CallMethod) Type ¶ added in v0.5.0
func (r *CallMethod) Type() core.ReplyType
Type returns type of the reply
type Children ¶ added in v0.5.0
Children is common reaction for methods returning id to lifeline states.
type Code ¶
type Code struct { Code []byte MachineType core.MachineType }
Code is code from storage.
type ErrType ¶ added in v0.6.0
type ErrType int
ErrType is used to determine and compare reply errors.
type Error ¶ added in v0.6.0
type Error struct {
ErrType ErrType
}
Error is common error reaction.
type GetChildrenRedirectReply ¶ added in v0.7.5
type GetChildrenRedirectReply struct { Receiver *core.RecordRef Token core.DelegationToken FromChild core.RecordID }
GetChildrenRedirectReply is a redirect reply for get children.
func NewGetChildrenRedirect ¶ added in v0.6.3
func NewGetChildrenRedirect( factory core.DelegationTokenFactory, parcel core.Parcel, receiver *core.RecordRef, fromChild core.RecordID, ) (*GetChildrenRedirectReply, error)
NewGetChildrenRedirect creates a new instance of GetChildrenRedirectReply.
func (*GetChildrenRedirectReply) GetReceiver ¶ added in v0.7.5
func (r *GetChildrenRedirectReply) GetReceiver() *core.RecordRef
GetReceiver returns node reference to send message to.
func (*GetChildrenRedirectReply) GetToken ¶ added in v0.7.5
func (r *GetChildrenRedirectReply) GetToken() core.DelegationToken
GetToken returns delegation token.
func (*GetChildrenRedirectReply) Redirected ¶ added in v0.7.5
func (r *GetChildrenRedirectReply) Redirected(genericMsg core.Message) core.Message
Redirected creates redirected message from redirect data.
func (*GetChildrenRedirectReply) Type ¶ added in v0.7.5
func (r *GetChildrenRedirectReply) Type() core.ReplyType
Type returns type of the reply
type GetCodeRedirectReply ¶ added in v0.7.5
type GetCodeRedirectReply struct { Receiver *core.RecordRef Token core.DelegationToken }
GetCodeRedirectReply is a redirect reply for get children.
func NewGetCodeRedirect ¶ added in v0.6.3
func NewGetCodeRedirect( factory core.DelegationTokenFactory, parcel core.Parcel, receiver *core.RecordRef, ) (*GetCodeRedirectReply, error)
NewGetCodeRedirect creates a new instance of GetChildrenRedirectReply.
func (*GetCodeRedirectReply) GetReceiver ¶ added in v0.7.5
func (r *GetCodeRedirectReply) GetReceiver() *core.RecordRef
GetReceiver returns node reference to send message to.
func (*GetCodeRedirectReply) GetToken ¶ added in v0.7.5
func (r *GetCodeRedirectReply) GetToken() core.DelegationToken
GetToken returns delegation token.
func (*GetCodeRedirectReply) Redirected ¶ added in v0.7.5
func (r *GetCodeRedirectReply) Redirected(genericMsg core.Message) core.Message
Redirected creates redirected message from redirect data.
func (*GetCodeRedirectReply) Type ¶ added in v0.7.5
func (r *GetCodeRedirectReply) Type() core.ReplyType
Type returns type of the reply
type GetObjectRedirectReply ¶ added in v0.7.5
type GetObjectRedirectReply struct { Receiver *core.RecordRef Token core.DelegationToken StateID *core.RecordID }
GetObjectRedirectReply is a redirect-reply for get object
func NewGetObjectRedirectReply ¶ added in v0.6.3
func NewGetObjectRedirectReply( factory core.DelegationTokenFactory, parcel core.Parcel, receiver *core.RecordRef, state *core.RecordID, ) (*GetObjectRedirectReply, error)
NewGetObjectRedirectReply return new GetObjectRedirectReply
func (*GetObjectRedirectReply) GetReceiver ¶ added in v0.7.5
func (r *GetObjectRedirectReply) GetReceiver() *core.RecordRef
GetReceiver returns node reference to send message to.
func (*GetObjectRedirectReply) GetToken ¶ added in v0.7.5
func (r *GetObjectRedirectReply) GetToken() core.DelegationToken
GetToken returns delegation token.
func (*GetObjectRedirectReply) Redirected ¶ added in v0.7.5
func (r *GetObjectRedirectReply) Redirected(genericMsg core.Message) core.Message
Redirected creates redirected message from redirect data.
func (*GetObjectRedirectReply) Type ¶ added in v0.7.5
func (r *GetObjectRedirectReply) Type() core.ReplyType
Type returns type of the reply
type HasPendingRequests ¶ added in v0.7.5
type HasPendingRequests struct {
Has bool
}
HasPendingRequests contains unclosed requests for an object.
func (*HasPendingRequests) Type ¶ added in v0.7.5
func (e *HasPendingRequests) Type() core.ReplyType
Type implementation of Reply interface.
type HeavyError ¶ added in v0.7.5
type HeavyError struct { Message string SubType ErrType JetID core.RecordID PulseNum core.PulseNumber }
HeavyError carries heavy sync error information.
func (*HeavyError) ConcreteType ¶ added in v0.7.5
func (e *HeavyError) ConcreteType() ErrType
ConcreteType returns concrete error type.
func (*HeavyError) Error ¶ added in v0.7.5
func (e *HeavyError) Error() string
Error returns error message for stored type.
func (*HeavyError) IsRetryable ¶ added in v0.7.5
func (e *HeavyError) IsRetryable() bool
IsRetryable returns true if retry could be performed.
func (*HeavyError) Type ¶ added in v0.7.5
func (e *HeavyError) Type() core.ReplyType
Type implementation of Reply interface.
type JetMiss ¶ added in v0.7.5
JetMiss is returned for miscalculated jets due to incomplete jet tree.
type NodeSignInt ¶ added in v0.7.5
type NotOK ¶ added in v0.7.5
type NotOK struct { }
NotOK is a generic reply for signaling a negative result.
type Object ¶
type Object struct { Head core.RecordRef State core.RecordID Prototype *core.RecordRef IsPrototype bool ChildPointer *core.RecordID Memory []byte Parent core.RecordRef }
Object is object from storage.
type ObjectIndex ¶ added in v0.6.3
type ObjectIndex struct {
Index []byte
}
ObjectIndex contains serialized object index. It can be stored in DB without processing.
func (*ObjectIndex) Type ¶ added in v0.6.3
func (e *ObjectIndex) Type() core.ReplyType
Type implementation of Reply interface.
type RegisterRequest ¶ added in v0.7.5
func (*RegisterRequest) Type ¶ added in v0.7.5
func (r *RegisterRequest) Type() core.ReplyType
Type returns type of the reply