model

package
v0.0.0-...-4892902 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	ServerList
	// contains filtered or unexported fields
}

func ReadFromFile

func ReadFromFile(path string, ttl time.Duration) (*Cache, error)

func TryReadCacheFromFile

func TryReadCacheFromFile(filePath string, ttl time.Duration) (*Cache, error)

func (*Cache) ClearOverdue

func (c *Cache) ClearOverdue()

func (*Cache) SaveToFile

func (c *Cache) SaveToFile(path string) error

func (*Cache) Update

func (c *Cache) Update(freshList ServerList)

type ServerFilter

type ServerFilter struct {
	AllTenants         bool
	AllProjects        bool
	AllServers         bool
	TenantIdentifiers  StringSet
	ProjectIdentifiers StringSet
	LabelSelector      string
	ServerIdentifiers  []string
}

func (ServerFilter) Validate

func (p ServerFilter) Validate() error

type ServerList

type ServerList struct {
	Tenants  map[iam.TenantUUID]iam.Tenant
	Projects map[iam.ProjectUUID]iam.Project
	Servers  map[ext.ServerUUID]ext.Server
}

type StringSet

type StringSet map[string]struct{}

func StringSetFromStringFlag

func StringSetFromStringFlag(flags *pflag.FlagSet, flagName string) (StringSet, error)

func (*StringSet) Contains

func (s *StringSet) Contains(identifier string) bool

func (*StringSet) IsEmpty

func (s *StringSet) IsEmpty() bool

func (*StringSet) Length

func (s *StringSet) Length() int

func (*StringSet) Put

func (s *StringSet) Put(identifier string)

Jump to

Keyboard shortcuts

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