types

package
v12.0.0-rc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "plan"
)

Variables

View Source
var (
	ErrInvalidMessage = sdkerrors.Register(ModuleName, 101, "invalid message")

	ErrDuplicateNodeForPlan           = sdkerrors.Register(ModuleName, 201, "duplicate node for plan")
	ErrInvalidNodeStatus              = sdkerrors.Register(ModuleName, 202, "invalid node status")
	ErrLeaseForNodeByProviderNotFound = sdkerrors.Register(ModuleName, 203, "lease for node by provider not found")
	ErrLeaseNotFound                  = sdkerrors.Register(ModuleName, 204, "lease not found")
	ErrNodeForPlanNotFound            = sdkerrors.Register(ModuleName, 205, "node for plan not found")
	ErrNodeNotFound                   = sdkerrors.Register(ModuleName, 206, "node not found")
	ErrPlanNotFound                   = sdkerrors.Register(ModuleName, 207, "plan not found")
	ErrProviderNotFound               = sdkerrors.Register(ModuleName, 208, "provider not found")
	ErrUnauthorized                   = sdkerrors.Register(ModuleName, 209, "unauthorized")
)
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 ActivePlanKey(id uint64) []byte

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 IDFromPlanForNodeByProviderKey

func IDFromPlanForNodeByProviderKey(key []byte) uint64

func IDFromPlanForProviderKey

func IDFromPlanForProviderKey(key []byte) uint64

func InactivePlanKey

func InactivePlanKey(id uint64) []byte

func NewErrorDuplicateNodeForPlan

func NewErrorDuplicateNodeForPlan(id uint64, addr base.NodeAddress) error

NewErrorDuplicateNodeForPlan returns an error indicating that a node already exists for the specified plan.

func NewErrorInvalidNodeStatus

func NewErrorInvalidNodeStatus(addr base.NodeAddress, status v1base.Status) error

NewErrorInvalidNodeStatus returns an error indicating that the provided status is invalid for the given node.

func NewErrorLeaseForNodeByProviderNotFound

func NewErrorLeaseForNodeByProviderNotFound(nodeAddr base.NodeAddress, provAddr base.ProvAddress) error

NewErrorLeaseForNodeByProviderNotFound returns an error indicating that the specified lease does not exist.

func NewErrorLeaseNotFound

func NewErrorLeaseNotFound(id uint64) error

NewErrorLeaseNotFound returns an error indicating that the specified lease does not exist.

func NewErrorNodeForPlanNotFound

func NewErrorNodeForPlanNotFound(id uint64, addr base.NodeAddress) error

NewErrorNodeForPlanNotFound returns an error indicating that the specified node does not exist for the plan.

func NewErrorNodeNotFound

func NewErrorNodeNotFound(addr base.NodeAddress) error

NewErrorNodeNotFound returns an error indicating that the specified node does not exist.

func NewErrorPlanNotFound

func NewErrorPlanNotFound(id uint64) error

NewErrorPlanNotFound returns an error indicating that the specified plan does not exist.

func NewErrorProviderNotFound

func NewErrorProviderNotFound(addr base.ProvAddress) error

NewErrorProviderNotFound returns an error indicating that the specified provider does not exist.

func NewErrorUnauthorized

func NewErrorUnauthorized(addr string) error

NewErrorUnauthorized returns an error indicating that the specified address is not authorized.

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.

Directories

Path Synopsis
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
Package v2 is a reverse proxy.
Package v2 is a reverse proxy.
Package v3 is a reverse proxy.
Package v3 is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL