sync

package
v2.2.14+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheKind = "SyncCache"

	//GlanceSyncCache       = "Glance"
	NetworkSyncCache      = "Network"
	NetworksDataSyncCache = "NetworkData"
)
View Source
const (
	HostNetworkDescBuilderCache      = "HostNetworkDescBuilderCache"
	BaremetalNetworkDescBuilderCache = "BaremetalNetworkDescBuilderCache"
)
View Source
const (
	NetworksBuilderCache = "NetworksBuilderCache"

	GuestNiCount       = "GuestNiCount"
	GroupNicCount      = "GroupNicCount"
	BaremetalNicCount  = "BaremetalNicCount"
	ReserveDipNicCount = "ReserveDipNicCount"
)

Variables

This section is empty.

Functions

func BuilderNetworkCacheKey

func BuilderNetworkCacheKey(obj interface{}) (string, error)

func NewSyncManager

func NewSyncManager(stopCh <-chan struct{}) *cache.GroupManager

Types

type NetworksBuilder

type NetworksBuilder interface {
	LoadAll() (map[string]*SchedNetworkBuildResult, error)
	Load(ids []string) (map[string]*SchedNetworkBuildResult, error)
	GetKey() string
	GetNetworksData(ids []string) []*SchedNetworkBuildResult
}

type NetworksDataBuilder

type NetworksDataBuilder struct {
	GuestNicCount      map[string]int
	GroupNicCount      map[string]int
	BaremetalNicCount  map[string]int
	ReserveDipNicCount map[string]int
	Wires              map[string]string
	// contains filtered or unexported fields
}

func NewNetworksBuilder

func NewNetworksBuilder() *NetworksDataBuilder

func (*NetworksDataBuilder) GetKey

func (b *NetworksDataBuilder) GetKey() string

func (*NetworksDataBuilder) GetNetworksData

func (b *NetworksDataBuilder) GetNetworksData(ids []string) (networks []*SchedNetworkBuildResult)

func (*NetworksDataBuilder) Load

func (*NetworksDataBuilder) LoadAll

type SchedNetworkBuildResult

type SchedNetworkBuildResult struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	TenantID   string `json:"tenant_id"`
	IsPublic   bool   `json:"is_public"`
	ServerType string `json:"server_type"`
	Ports      int    `json:"ports"`
	IsExit     bool   `json:"is_exit"`
	Wire       string `json:"wire_name"`
	WireID     string `json:"wire_id"`
}

Directories

Path Synopsis
networks
db

Jump to

Keyboard shortcuts

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