Documentation
¶
Index ¶
- func RegisterCodec()
- type EventHealthAttestation
- type HealthAttestation
- type HealthStatus
- type MsgHealthAttestation
- func (msg MsgHealthAttestation) GetSignBytes() []byte
- func (msg MsgHealthAttestation) GetSigners() []sdk.AccAddress
- func (msg *MsgHealthAttestation) ProtoMessage()
- func (msg *MsgHealthAttestation) Reset()
- func (msg MsgHealthAttestation) Route() string
- func (msg *MsgHealthAttestation) String() string
- func (msg MsgHealthAttestation) Type() string
- func (msg MsgHealthAttestation) ValidateBasic() error
- type MsgHealthAttestationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCodec ¶
func RegisterCodec()
RegisterCodec is a placeholder for registering types The actual codec registration will be done through the module's codec
Types ¶
type EventHealthAttestation ¶
type EventHealthAttestation struct {
LeaseID mv1.LeaseID `json:"lease_id"`
Provider string `json:"provider"`
Status HealthStatus `json:"status"`
BlockHeight int64 `json:"block_height"`
}
EventHealthAttestation is emitted when a health attestation is submitted
type HealthAttestation ¶
type HealthAttestation struct {
LeaseID mv1.LeaseID `json:"lease_id"`
Provider string `json:"provider"`
Status HealthStatus `json:"status"`
BlockHeight int64 `json:"block_height"`
Timestamp int64 `json:"timestamp"`
Message string `json:"message,omitempty"`
}
HealthAttestation represents a stored health attestation
type HealthStatus ¶
type HealthStatus int32
HealthStatus represents the health status of a lease
const ( // HealthStatusUnknown - default status HealthStatusUnknown HealthStatus = 0 // HealthStatusHealthy - container is running properly HealthStatusHealthy HealthStatus = 1 // HealthStatusDegraded - container is running but with issues HealthStatusDegraded HealthStatus = 2 // HealthStatusFailed - container has failed HealthStatusFailed HealthStatus = 3 )
func ParseHealthStatus ¶
func ParseHealthStatus(s string) HealthStatus
ParseHealthStatus converts a string to HealthStatus
func (HealthStatus) String ¶
func (s HealthStatus) String() string
type MsgHealthAttestation ¶
type MsgHealthAttestation struct {
// LeaseID is the unique identifier of the lease
LeaseID mv1.LeaseID `json:"lease_id"`
// Provider is the address of the provider submitting the attestation
Provider string `json:"provider"`
// Status is the health status of the lease
Status HealthStatus `json:"status"`
// Timestamp is the time of the attestation (block height)
Timestamp int64 `json:"timestamp"`
// Message is an optional status message
Message string `json:"message,omitempty"`
}
MsgHealthAttestation is the message type for health attestations
func (MsgHealthAttestation) GetSignBytes ¶
func (msg MsgHealthAttestation) GetSignBytes() []byte
GetSignBytes implements sdk.Msg
func (MsgHealthAttestation) GetSigners ¶
func (msg MsgHealthAttestation) GetSigners() []sdk.AccAddress
GetSigners implements sdk.Msg
func (*MsgHealthAttestation) ProtoMessage ¶
func (msg *MsgHealthAttestation) ProtoMessage()
func (*MsgHealthAttestation) Reset ¶
func (msg *MsgHealthAttestation) Reset()
Implement proto.Message interface
func (MsgHealthAttestation) Route ¶
func (msg MsgHealthAttestation) Route() string
Route implements sdk.Msg
func (*MsgHealthAttestation) String ¶
func (msg *MsgHealthAttestation) String() string
func (MsgHealthAttestation) Type ¶
func (msg MsgHealthAttestation) Type() string
Type implements sdk.Msg
func (MsgHealthAttestation) ValidateBasic ¶
func (msg MsgHealthAttestation) ValidateBasic() error
ValidateBasic implements sdk.Msg
type MsgHealthAttestationResponse ¶
type MsgHealthAttestationResponse struct{}
MsgHealthAttestationResponse is the response for health attestation