Documentation
¶
Index ¶
- Constants
- Variables
- func ListBlockStoreStates(ctx context.Context, w world.WorldState) ([]string, error)
- func NewBlockStoreStateBlock() block.Block
- func NewBlockStoreStateKey(providerID, providerAccID, bstoreID string) string
- type BlockStoreState
- func CollectBlockStoreStates(ctx context.Context, w world.WorldState) ([]*BlockStoreState, []string, error)
- func LookupBlockStoreState(ctx context.Context, w world.WorldState, objKey string) (*BlockStoreState, world.ObjectState, error)
- func UnmarshalBlockStoreState(ctx context.Context, bcs *block.Cursor) (*BlockStoreState, error)
- func (m *BlockStoreState) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *BlockStoreState) CloneVT() *BlockStoreState
- func (this *BlockStoreState) EqualMessageVT(thatMsg any) bool
- func (this *BlockStoreState) EqualVT(that *BlockStoreState) bool
- func (x *BlockStoreState) GetRef() *bstore.BlockStoreRef
- func (i *BlockStoreState) MarshalBlock() ([]byte, error)
- func (x *BlockStoreState) MarshalJSON() ([]byte, error)
- func (x *BlockStoreState) MarshalProtoJSON(s *json.MarshalState)
- func (x *BlockStoreState) MarshalProtoText() string
- func (m *BlockStoreState) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *BlockStoreState) MarshalToVT(dAtA []byte) (int, error)
- func (m *BlockStoreState) MarshalVT() (dAtA []byte, err error)
- func (*BlockStoreState) ProtoMessage()
- func (x *BlockStoreState) Reset()
- func (m *BlockStoreState) SizeVT() (n int)
- func (x *BlockStoreState) String() string
- func (i *BlockStoreState) UnmarshalBlock(data []byte) error
- func (x *BlockStoreState) UnmarshalJSON(b []byte) error
- func (x *BlockStoreState) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *BlockStoreState) UnmarshalVT(dAtA []byte) error
- func (i *BlockStoreState) Validate() error
- type UpdateBlockStoreStateOp
- func (o *UpdateBlockStoreStateOp) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (o *UpdateBlockStoreStateOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *UpdateBlockStoreStateOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *UpdateBlockStoreStateOp) CloneVT() *UpdateBlockStoreStateOp
- func (this *UpdateBlockStoreStateOp) EqualMessageVT(thatMsg any) bool
- func (this *UpdateBlockStoreStateOp) EqualVT(that *UpdateBlockStoreStateOp) bool
- func (x *UpdateBlockStoreStateOp) GetIfNotExists() bool
- func (o *UpdateBlockStoreStateOp) GetOperationTypeId() string
- func (x *UpdateBlockStoreStateOp) GetUpdatedState() *BlockStoreState
- func (o *UpdateBlockStoreStateOp) MarshalBlock() ([]byte, error)
- func (x *UpdateBlockStoreStateOp) MarshalJSON() ([]byte, error)
- func (x *UpdateBlockStoreStateOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *UpdateBlockStoreStateOp) MarshalProtoText() string
- func (m *UpdateBlockStoreStateOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *UpdateBlockStoreStateOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *UpdateBlockStoreStateOp) MarshalVT() (dAtA []byte, err error)
- func (*UpdateBlockStoreStateOp) ProtoMessage()
- func (x *UpdateBlockStoreStateOp) Reset()
- func (m *UpdateBlockStoreStateOp) SizeVT() (n int)
- func (x *UpdateBlockStoreStateOp) String() string
- func (o *UpdateBlockStoreStateOp) UnmarshalBlock(data []byte) error
- func (x *UpdateBlockStoreStateOp) UnmarshalJSON(b []byte) error
- func (x *UpdateBlockStoreStateOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *UpdateBlockStoreStateOp) UnmarshalVT(dAtA []byte) error
- func (o *UpdateBlockStoreStateOp) Validate() error
Constants ¶
const ( // BlockStoreStatePrefix is the prefix applied to local bstore IDs. BlockStoreStatePrefix = "bstore/" // BlockStoreStateTypeID is the type identifier for a BlockStoreState. // // The object contents is a BlockStoreStateInfo message. BlockStoreStateTypeID = "bstore/state" )
Variables ¶
var UpdateBlockStoreStateOpId = BlockStoreStateTypeID + "/update"
UpdateBlockStoreStateOpId is the operation to update information about a block store.
Functions ¶
func ListBlockStoreStates ¶
ListBlockStoreStates returns all BlockStoreState objects in the world by object key. returns nil, nil if not found.
func NewBlockStoreStateBlock ¶
NewBlockStoreStateBlock constructs a new BlockStoreState block.
func NewBlockStoreStateKey ¶
NewBlockStoreStateKey builds a key from a local bstore id.
Types ¶
type BlockStoreState ¶
type BlockStoreState struct {
// Ref is the block store ref on the provider.
Ref *bstore.BlockStoreRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
// contains filtered or unexported fields
}
BlockStoreState contains a BlockStore reference.
func CollectBlockStoreStates ¶
func CollectBlockStoreStates(ctx context.Context, w world.WorldState) ([]*BlockStoreState, []string, error)
CollectBlockStoreStates collects all local bstore objects in the world.
func LookupBlockStoreState ¶
func LookupBlockStoreState(ctx context.Context, w world.WorldState, objKey string) (*BlockStoreState, world.ObjectState, error)
LookupBlockStoreState looks up a local bstore object with the given object key. returns nil, nil, ErrObjectNotFound if not found.
func UnmarshalBlockStoreState ¶
UnmarshalBlockStoreState unmarshals a BlockStoreState from a block cursor.
func (*BlockStoreState) CloneMessageVT ¶
func (m *BlockStoreState) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*BlockStoreState) CloneVT ¶
func (m *BlockStoreState) CloneVT() *BlockStoreState
func (*BlockStoreState) EqualMessageVT ¶
func (this *BlockStoreState) EqualMessageVT(thatMsg any) bool
func (*BlockStoreState) EqualVT ¶
func (this *BlockStoreState) EqualVT(that *BlockStoreState) bool
func (*BlockStoreState) GetRef ¶
func (x *BlockStoreState) GetRef() *bstore.BlockStoreRef
func (*BlockStoreState) MarshalBlock ¶
func (i *BlockStoreState) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*BlockStoreState) MarshalJSON ¶
func (x *BlockStoreState) MarshalJSON() ([]byte, error)
MarshalJSON marshals the BlockStoreState to JSON.
func (*BlockStoreState) MarshalProtoJSON ¶
func (x *BlockStoreState) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the BlockStoreState message to JSON.
func (*BlockStoreState) MarshalProtoText ¶
func (x *BlockStoreState) MarshalProtoText() string
func (*BlockStoreState) MarshalToSizedBufferVT ¶
func (m *BlockStoreState) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*BlockStoreState) MarshalToVT ¶
func (m *BlockStoreState) MarshalToVT(dAtA []byte) (int, error)
func (*BlockStoreState) MarshalVT ¶
func (m *BlockStoreState) MarshalVT() (dAtA []byte, err error)
func (*BlockStoreState) ProtoMessage ¶
func (*BlockStoreState) ProtoMessage()
func (*BlockStoreState) Reset ¶
func (x *BlockStoreState) Reset()
func (*BlockStoreState) SizeVT ¶
func (m *BlockStoreState) SizeVT() (n int)
func (*BlockStoreState) String ¶
func (x *BlockStoreState) String() string
func (*BlockStoreState) UnmarshalBlock ¶
func (i *BlockStoreState) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*BlockStoreState) UnmarshalJSON ¶
func (x *BlockStoreState) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the BlockStoreState from JSON.
func (*BlockStoreState) UnmarshalProtoJSON ¶
func (x *BlockStoreState) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the BlockStoreState message from JSON.
func (*BlockStoreState) UnmarshalVT ¶
func (m *BlockStoreState) UnmarshalVT(dAtA []byte) error
func (*BlockStoreState) Validate ¶
func (i *BlockStoreState) Validate() error
Validate validates the BlockStoreState.
type UpdateBlockStoreStateOp ¶
type UpdateBlockStoreStateOp struct {
// UpdatedState is the updated local block store state.
// The object key is derived from the block store ref.
UpdatedState *BlockStoreState `protobuf:"bytes,1,opt,name=updated_state,json=updatedState,proto3" json:"updatedState,omitempty"`
// IfNotExists prevents overwriting an existing state if it exists.
IfNotExists bool `protobuf:"varint,2,opt,name=if_not_exists,json=ifNotExists,proto3" json:"ifNotExists,omitempty"`
// contains filtered or unexported fields
}
UpdateBlockStoreStateOp is an world operation to update a BlockStoreState.
func NewUpdateBlockStoreStateOp ¶
func NewUpdateBlockStoreStateOp(updatedState *BlockStoreState, ifNotExists bool) *UpdateBlockStoreStateOp
NewUpdateBlockStoreStateOp constructs a new UpdateBlockStoreStateOp block.
func (*UpdateBlockStoreStateOp) ApplyWorldObjectOp ¶
func (o *UpdateBlockStoreStateOp) ApplyWorldObjectOp( ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, sender peer.ID, ) (sysErr bool, err error)
ApplyWorldObjectOp applies the operation to a world object handle.
func (*UpdateBlockStoreStateOp) ApplyWorldOp ¶
func (o *UpdateBlockStoreStateOp) ApplyWorldOp( ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, sender peer.ID, ) (sysErr bool, err error)
ApplyWorldOp applies the operation as a world operation.
func (*UpdateBlockStoreStateOp) CloneMessageVT ¶
func (m *UpdateBlockStoreStateOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*UpdateBlockStoreStateOp) CloneVT ¶
func (m *UpdateBlockStoreStateOp) CloneVT() *UpdateBlockStoreStateOp
func (*UpdateBlockStoreStateOp) EqualMessageVT ¶
func (this *UpdateBlockStoreStateOp) EqualMessageVT(thatMsg any) bool
func (*UpdateBlockStoreStateOp) EqualVT ¶
func (this *UpdateBlockStoreStateOp) EqualVT(that *UpdateBlockStoreStateOp) bool
func (*UpdateBlockStoreStateOp) GetIfNotExists ¶
func (x *UpdateBlockStoreStateOp) GetIfNotExists() bool
func (*UpdateBlockStoreStateOp) GetOperationTypeId ¶
func (o *UpdateBlockStoreStateOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*UpdateBlockStoreStateOp) GetUpdatedState ¶
func (x *UpdateBlockStoreStateOp) GetUpdatedState() *BlockStoreState
func (*UpdateBlockStoreStateOp) MarshalBlock ¶
func (o *UpdateBlockStoreStateOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*UpdateBlockStoreStateOp) MarshalJSON ¶
func (x *UpdateBlockStoreStateOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the UpdateBlockStoreStateOp to JSON.
func (*UpdateBlockStoreStateOp) MarshalProtoJSON ¶
func (x *UpdateBlockStoreStateOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the UpdateBlockStoreStateOp message to JSON.
func (*UpdateBlockStoreStateOp) MarshalProtoText ¶
func (x *UpdateBlockStoreStateOp) MarshalProtoText() string
func (*UpdateBlockStoreStateOp) MarshalToSizedBufferVT ¶
func (m *UpdateBlockStoreStateOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*UpdateBlockStoreStateOp) MarshalToVT ¶
func (m *UpdateBlockStoreStateOp) MarshalToVT(dAtA []byte) (int, error)
func (*UpdateBlockStoreStateOp) MarshalVT ¶
func (m *UpdateBlockStoreStateOp) MarshalVT() (dAtA []byte, err error)
func (*UpdateBlockStoreStateOp) ProtoMessage ¶
func (*UpdateBlockStoreStateOp) ProtoMessage()
func (*UpdateBlockStoreStateOp) Reset ¶
func (x *UpdateBlockStoreStateOp) Reset()
func (*UpdateBlockStoreStateOp) SizeVT ¶
func (m *UpdateBlockStoreStateOp) SizeVT() (n int)
func (*UpdateBlockStoreStateOp) String ¶
func (x *UpdateBlockStoreStateOp) String() string
func (*UpdateBlockStoreStateOp) UnmarshalBlock ¶
func (o *UpdateBlockStoreStateOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*UpdateBlockStoreStateOp) UnmarshalJSON ¶
func (x *UpdateBlockStoreStateOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the UpdateBlockStoreStateOp from JSON.
func (*UpdateBlockStoreStateOp) UnmarshalProtoJSON ¶
func (x *UpdateBlockStoreStateOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the UpdateBlockStoreStateOp message from JSON.
func (*UpdateBlockStoreStateOp) UnmarshalVT ¶
func (m *UpdateBlockStoreStateOp) UnmarshalVT(dAtA []byte) error
func (*UpdateBlockStoreStateOp) Validate ¶
func (o *UpdateBlockStoreStateOp) Validate() error
Validate performs cursory validation of the operation. Should not block.