resource

package
v0.0.0-...-7501429 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FailoverSourceID FailoverSource = iota + 1
	FailoverSourceSchema

	// FailOverModeDistributed ...
	FailOverModeDistributed FailOverMode = "distributed"
	// FailOverModeSingle ...
	FailOverModeSingle FailOverMode = "single"

	TagsFieldName              = "tags"
	InstancesFieldName         = "instances"
	LocationsFieldName         = "locations"
	PrimaryCountFieldName      = "primary_count"
	SecondaryCountFieldName    = "secondary_count"
	TertiaryCountFieldName     = "tertiary_count"
	FailoverInstancesFieldName = "failover_instances"
	FailoverModeFieldName      = "failover_mode"
	PrefixFieldName            = "prefix"
	MetricNameFieldName        = "metric_name"
	MetricNamespaceFieldName   = "metric_namespace"
)

Variables

This section is empty.

Functions

func BsonPack

func BsonPack(failover interface{}) (string, error)

func BsonUnPack

func BsonUnPack(failover interface{}, data string) error

func ExpandInt

func ExpandInt(values []interface{}) []int

func ExpandString

func ExpandString(values []interface{}) []string

func GetPolkadotSchema

func GetPolkadotSchema() map[string]*schema.Schema

Types

type FailOverMode

type FailOverMode string

FailOverMode enumerates the values for upgrade mode.

type Failover

type Failover struct {
	Prefix            string
	FailoverMode      FailOverMode
	MetricName        string
	MetricNameSpace   string
	Instances         []int
	Locations         []string
	PrimaryCount      int
	SecondaryCount    int
	TertiaryCount     int
	FailoverInstances []int
	Source            FailoverSource
}

func (*Failover) FillDefaultCountsIfNotSet

func (f *Failover) FillDefaultCountsIfNotSet()

func (*Failover) FromSchema

func (f *Failover) FromSchema(d *schema.ResourceData) error

func (Failover) Initialized

func (f Failover) Initialized() bool

func (Failover) InstancesCount

func (f Failover) InstancesCount() int

func (Failover) IsDistributedMode

func (f Failover) IsDistributedMode() bool

func (Failover) IsNotSet

func (f Failover) IsNotSet() bool

func (Failover) IsSingleMode

func (f Failover) IsSingleMode() bool

func (*Failover) SetCounts

func (f *Failover) SetCounts(values ...int)

func (*Failover) SetPrimaryCount

func (f *Failover) SetPrimaryCount(n int)

func (Failover) SetSchemaValues

func (f Failover) SetSchemaValues(d *schema.ResourceData) error

func (Failover) SetSchemaValuesDiag

func (f Failover) SetSchemaValuesDiag(d *schema.ResourceData) diag.Diagnostics

func (*Failover) SetSecondaryCount

func (f *Failover) SetSecondaryCount(n int)

func (*Failover) SetTertiaryCount

func (f *Failover) SetTertiaryCount(n int)

type FailoverSource

type FailoverSource int

type Pack

type Pack func(failover interface{}) (string, error)

type UnPack

type UnPack func(failover interface{}, data string) error

Jump to

Keyboard shortcuts

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