Documentation
¶
Index ¶
- Constants
- Variables
- func ActivePlanKey(id uint64) []byte
- func GetPlanForNodeByProviderKeyPrefix(nodeAddr base.NodeAddress, provAddr base.ProvAddress) []byte
- func GetPlanForNodeKeyPrefix(addr base.NodeAddress) []byte
- func GetPlanForProviderKeyPrefix(addr base.ProvAddress) []byte
- func IDFromPlanForNodeByProviderKey(key []byte) uint64
- func IDFromPlanForProviderKey(key []byte) uint64
- func InactivePlanKey(id uint64) []byte
- func NewErrorDuplicateNodeForPlan(id uint64, addr base.NodeAddress) error
- func NewErrorInvalidNodeStatus(addr base.NodeAddress, status v1base.Status) error
- func NewErrorLeaseNotFound(nodeAddr base.NodeAddress, provAddr base.ProvAddress) error
- func NewErrorNodeForPlanNotFound(id uint64, addr base.NodeAddress) error
- func NewErrorNodeNotFound(addr base.NodeAddress) error
- func NewErrorPlanNotFound(id uint64) error
- func NewErrorProviderNotFound(addr base.ProvAddress) error
- func NewErrorUnauthorized(addr string) error
- func PlanForNodeByProviderKey(nodeAddr base.NodeAddress, provAddr base.ProvAddress, id uint64) []byte
- func PlanForProviderKey(addr base.ProvAddress, id uint64) []byte
Constants ¶
View Source
const (
ModuleName = "plan"
)
Variables ¶
View Source
var ( ErrorInvalidMessage = sdkerrors.Register(ModuleName, 101, "invalid message") ErrorDuplicateNode = sdkerrors.Register(ModuleName, 201, "duplicate node") ErrorInvalidNodeStatus = sdkerrors.Register(ModuleName, 202, "invalid node status") ErrorLeaseNotFound = sdkerrors.Register(ModuleName, 203, "lease not found") ErrorNodeNotFound = sdkerrors.Register(ModuleName, 204, "node not found") ErrorPlanNotFound = sdkerrors.Register(ModuleName, 205, "plan not found") ErrorProviderNotFound = sdkerrors.Register(ModuleName, 206, "provider not found") )
View Source
var ( CountKey = []byte{0x00} PlanKeyPrefix = []byte{0x10} ActivePlanKeyPrefix = append(PlanKeyPrefix, 0x01) InactivePlanKeyPrefix = append(PlanKeyPrefix, 0x02) PlanForNodeKeyPrefix = []byte{0x11} PlanForProviderKeyPrefix = []byte{0x12} )
Functions ¶
func ActivePlanKey ¶
func GetPlanForNodeByProviderKeyPrefix ¶
func GetPlanForNodeByProviderKeyPrefix(nodeAddr base.NodeAddress, provAddr base.ProvAddress) []byte
func GetPlanForNodeKeyPrefix ¶
func GetPlanForNodeKeyPrefix(addr base.NodeAddress) []byte
func GetPlanForProviderKeyPrefix ¶
func GetPlanForProviderKeyPrefix(addr base.ProvAddress) []byte
func InactivePlanKey ¶
func NewErrorDuplicateNodeForPlan ¶
func NewErrorDuplicateNodeForPlan(id uint64, addr base.NodeAddress) error
func NewErrorInvalidNodeStatus ¶
func NewErrorInvalidNodeStatus(addr base.NodeAddress, status v1base.Status) error
func NewErrorLeaseNotFound ¶
func NewErrorLeaseNotFound(nodeAddr base.NodeAddress, provAddr base.ProvAddress) error
func NewErrorNodeForPlanNotFound ¶
func NewErrorNodeForPlanNotFound(id uint64, addr base.NodeAddress) error
func NewErrorNodeNotFound ¶
func NewErrorNodeNotFound(addr base.NodeAddress) error
func NewErrorPlanNotFound ¶
func NewErrorProviderNotFound ¶
func NewErrorProviderNotFound(addr base.ProvAddress) error
func NewErrorUnauthorized ¶
func PlanForNodeByProviderKey ¶
func PlanForNodeByProviderKey(nodeAddr base.NodeAddress, provAddr base.ProvAddress, id uint64) []byte
func PlanForProviderKey ¶
func PlanForProviderKey(addr base.ProvAddress, id uint64) []byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.