Documentation ¶
Index ¶
Constants ¶
const ( DefaultCodespace sdk.CodespaceType = ModuleName MemberDoesNotExist sdk.CodeType = 101 )
DefaultCodespace is the Module Name
const ( // ModuleName is the name of the module ModuleName = "daemon" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // StoreKey to be used when creating the KVStore TStoreKey = "T_" + ModuleName )
const RouterKey = ModuleName // this was defined in your key.go file
RouterKey is the module name router key
Variables ¶
var ModuleCdc = codec.New()
ModuleCdc is the codec for the module
var (
NilMember = Member{}
)
Functions ¶
func ErrMemberDoesNotExist ¶
func ErrMemberDoesNotExist(codespace sdk.CodespaceType) sdk.Error
ErrMemberDoesNotExist is the error for name not existing
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type Member ¶
type Member struct { NodeID string `json:"nodeid"` Name string `json:"name"` Heartbeat time.Time `json:"heartbeat"` Owner sdk.AccAddress `json:"owner"` // contains filtered or unexported fields }
Member member info
type MsgAddMember ¶
type MsgAddMember struct { Name string NodeID string Owner sdk.AccAddress }
MsgAddMember add member message
func NewMsgAddMember ¶
func NewMsgAddMember(name string, nodeid string) MsgAddMember
func (MsgAddMember) GetSignBytes ¶
func (msg MsgAddMember) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgAddMember) GetSigners ¶
func (msg MsgAddMember) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgAddMember) Route ¶
func (msg MsgAddMember) Route() string
Route should return the name of the module
func (MsgAddMember) SetOwner ¶
func (msg MsgAddMember) SetOwner(owner sdk.AccAddress)
func (MsgAddMember) ValidateBasic ¶
func (msg MsgAddMember) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgHeartbeat ¶
type MsgHeartbeat struct { NodeID string Time time.Time Owner sdk.AccAddress }
MsgHeartbeat heartbeat message
func NewMsgHeartbeat ¶
func NewMsgHeartbeat(nodeid string, time time.Time, owner sdk.AccAddress) MsgHeartbeat
func (MsgHeartbeat) GetSignBytes ¶
func (msg MsgHeartbeat) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgHeartbeat) GetSigners ¶
func (msg MsgHeartbeat) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgHeartbeat) Route ¶
func (msg MsgHeartbeat) Route() string
Route should return the name of the module
func (MsgHeartbeat) SetOwner ¶
func (msg MsgHeartbeat) SetOwner(owner sdk.AccAddress)
func (MsgHeartbeat) ValidateBasic ¶
func (msg MsgHeartbeat) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgRemoveMember ¶
type MsgRemoveMember struct { NodeID string Owner sdk.AccAddress }
MsgRemoveMember remove member message
func NewMsgRemoveMember ¶
func NewMsgRemoveMember(nodeid string) MsgRemoveMember
func (MsgRemoveMember) GetSignBytes ¶
func (msg MsgRemoveMember) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgRemoveMember) GetSigners ¶
func (msg MsgRemoveMember) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgRemoveMember) Route ¶
func (msg MsgRemoveMember) Route() string
Route should return the name of the module
func (MsgRemoveMember) SetOwner ¶
func (msg MsgRemoveMember) SetOwner(owner sdk.AccAddress)
func (MsgRemoveMember) Type ¶
func (msg MsgRemoveMember) Type() string
Type should return the action
func (MsgRemoveMember) ValidateBasic ¶
func (msg MsgRemoveMember) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type QueryResMember ¶
QueryMember Queries Result Payload for a member
type QueryResNodeIDs ¶
type QueryResNodeIDs []string
QueryMembers Queries Result Payload for member ids query