model

package
v0.0.0-...-5fda629 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelRead   = "read.only"
	LevelWrite1 = "write.level1"
	LevelWrite2 = "write.level2"
	LevelWrite3 = "write.level3"
)

Variables

This section is empty.

Functions

func Levels

func Levels() []string

func MarshallCompose

func MarshallCompose(st *SupbStrategyBaseInfo) error

func ValidateDynamicStrategy

func ValidateDynamicStrategy(strategy *SupbStrategyBaseInfo) error

func ValidateStaticStrategy

func ValidateStaticStrategy(strategy *SupbStrategyBaseInfo) error

func ValidateStrategySlave

func ValidateStrategySlave(slave *StrategySlave) error

Types

type StrategySlave

type StrategySlave struct {
	SlaveTypes  string                   `json:"application_types"`
	SlaveLevel  string                   `json:"application_level"`
	SlaveKey    types.SupbApplicationKey `json:"application_key"`
	SlaveStatus string                   `json:"application_status"`
}

func (*StrategySlave) DeepCopy

func (r *StrategySlave) DeepCopy() *StrategySlave

type SupbStrategyBaseInfo

type SupbStrategyBaseInfo struct {
	StrategyVersion          uint64 `json:"strategy_version"`
	StrategyShortDescription string `json:"strategy_description_short"`
	StrategyDescription      string `json:"strategy_description_long"`
	StrategyName             string `json:"strategy_name"`
	StrategyType             string `json:"strategy_type"`
	StrategyStatus           string `json:"strategy_status"`

	StrategyKey       types.SupbStrategyKey   `json:"strategy_key"`
	StrategyKeyParent types.SupbStrategyKey   `json:"strategy_parent"`
	StrategyLevel     types.SupbStrategyLevel `json:"strategy_level"`

	StrategySlaves map[types.SupbApplicationKey]*StrategySlave `json:"strategy_slaves"`

	StrategyContainerNamePrefix string                `json:"strategy_container_name_prefix"`
	StrategyContainers          []*compose.Containers `json:"strategy_containers"`
	StrategyCompose             string                `json:"strategy_compose_yaml"`
	StrategyTags                []types.Tag           `json:"strategy_tags"`
}

func (*SupbStrategyBaseInfo) DeepCopy

Jump to

Keyboard shortcuts

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