db

package
v2.1.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostNetworkDescBuilderCache      = "HostNetworkDescBuilderCache"
	BaremetalNetworkDescBuilderCache = "BaremetalNetworkDescBuilderCache"
)

Variables

This section is empty.

Functions

func BuilderCacheKey

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

func LoadNetworkDescBuilder

func LoadNetworkDescBuilder() ([]interface{}, error)

func UpdateNetworkDescBuilder

func UpdateNetworkDescBuilder(keys []string) ([]interface{}, error)

Types

type BaremetalNetworkDescBuilder

type BaremetalNetworkDescBuilder struct {
	// contains filtered or unexported fields
}

func NewBaremetalNetworkDescBuilder

func NewBaremetalNetworkDescBuilder() *BaremetalNetworkDescBuilder

TODO:we should not new a object every time, the map memory leak, if want map was GCed, you must set b.data = nil and so on.

func (*BaremetalNetworkDescBuilder) GetKey

func (b *BaremetalNetworkDescBuilder) GetKey() string

func (*BaremetalNetworkDescBuilder) GetNetworkDesc

func (b *BaremetalNetworkDescBuilder) GetNetworkDesc(id string) ([]string, error)

func (*BaremetalNetworkDescBuilder) Load

func (b *BaremetalNetworkDescBuilder) Load(ids []string) (map[string][]string, error)

func (*BaremetalNetworkDescBuilder) LoadAll

func (b *BaremetalNetworkDescBuilder) LoadAll() (map[string][]string, error)

type HostNetworkDescBuilder

type HostNetworkDescBuilder struct {
	// contains filtered or unexported fields
}

func NewHostNetworkDescBuilder

func NewHostNetworkDescBuilder() *HostNetworkDescBuilder

func (*HostNetworkDescBuilder) GetKey

func (b *HostNetworkDescBuilder) GetKey() string

func (*HostNetworkDescBuilder) GetNetworkDesc

func (b *HostNetworkDescBuilder) GetNetworkDesc(id string) ([]string, error)

func (*HostNetworkDescBuilder) Load

func (b *HostNetworkDescBuilder) Load(ids []string) (map[string][]string, error)

func (*HostNetworkDescBuilder) LoadAll

func (b *HostNetworkDescBuilder) LoadAll() (map[string][]string, error)

type NetworkDescBuilder

type NetworkDescBuilder interface {
	LoadAll() (map[string][]string, error)
	Load(ids []string) (map[string][]string, error)
	GetKey() string
	GetNetworkDesc(id string) ([]string, error)
}

Jump to

Keyboard shortcuts

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