...

Package store

import "github.com/Microsoft/hcsshim/internal/ncproxy/store"
Overview
Index

Overview ▾

Index ▾

Variables
type ComputeAgentStore
    func NewComputeAgentStore(db *bolt.DB) *ComputeAgentStore
    func (c *ComputeAgentStore) Close() error
    func (c *ComputeAgentStore) DeleteComputeAgent(ctx context.Context, containerID string) error
    func (c *ComputeAgentStore) GetComputeAgent(ctx context.Context, containerID string) (result string, err error)
    func (c *ComputeAgentStore) GetComputeAgents(ctx context.Context) (map[string]string, error)
    func (c *ComputeAgentStore) UpdateComputeAgent(ctx context.Context, containerID string, address string) error
type NetworkingStore
    func NewNetworkingStore(database *bolt.DB) *NetworkingStore
    func (n *NetworkingStore) Close() error
    func (n *NetworkingStore) CreatEndpoint(ctx context.Context, endpt *ncproxynetworking.Endpoint) error
    func (n *NetworkingStore) CreateNetwork(ctx context.Context, network *ncproxynetworking.Network) error
    func (n *NetworkingStore) DeleteEndpoint(ctx context.Context, endpointName string) error
    func (n *NetworkingStore) DeleteNetwork(ctx context.Context, networkName string) error
    func (n *NetworkingStore) GetEndpointByName(ctx context.Context, endpointName string) (*ncproxynetworking.Endpoint, error)
    func (n *NetworkingStore) GetNetworkByName(ctx context.Context, networkName string) (*ncproxynetworking.Network, error)
    func (n *NetworkingStore) ListEndpoints(ctx context.Context) (results []*ncproxynetworking.Endpoint, err error)
    func (n *NetworkingStore) ListNetworks(ctx context.Context) (results []*ncproxynetworking.Network, err error)
    func (n *NetworkingStore) UpdateEndpoint(ctx context.Context, endpt *ncproxynetworking.Endpoint) error

Package files

buckets.go store.go

Variables

var (
    ErrBucketNotFound = errors.New("bucket not found")
    ErrKeyNotFound    = errors.New("key does not exist")
)

type ComputeAgentStore

ComputeAgentStore is a database that stores a key value pair of container id to compute agent server address

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

func NewComputeAgentStore

func NewComputeAgentStore(db *bolt.DB) *ComputeAgentStore

func (*ComputeAgentStore) Close

func (c *ComputeAgentStore) Close() error

func (*ComputeAgentStore) DeleteComputeAgent

func (c *ComputeAgentStore) DeleteComputeAgent(ctx context.Context, containerID string) error

DeleteComputeAgent deletes an entry in the database or returns an error if none exists `containerID` corresponds to the target key that the entry should be deleted for

func (*ComputeAgentStore) GetComputeAgent

func (c *ComputeAgentStore) GetComputeAgent(ctx context.Context, containerID string) (result string, err error)

GetComputeAgent returns the compute agent address of a single entry in the database for key `containerID` or returns an error if the key does not exist

func (*ComputeAgentStore) GetComputeAgents

func (c *ComputeAgentStore) GetComputeAgents(ctx context.Context) (map[string]string, error)

GetComputeAgents returns a map of the key value pairs stored in the database where the keys are the containerIDs and the values are the corresponding compute agent server addresses

func (*ComputeAgentStore) UpdateComputeAgent

func (c *ComputeAgentStore) UpdateComputeAgent(ctx context.Context, containerID string, address string) error

UpdateComputeAgent updates or adds an entry (if none already exists) to the database `address` corresponds to the address of the compute agent server for the `containerID`

type NetworkingStore

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

func NewNetworkingStore

func NewNetworkingStore(database *bolt.DB) *NetworkingStore

func (*NetworkingStore) Close

func (n *NetworkingStore) Close() error

func (*NetworkingStore) CreatEndpoint

func (n *NetworkingStore) CreatEndpoint(ctx context.Context, endpt *ncproxynetworking.Endpoint) error

func (*NetworkingStore) CreateNetwork

func (n *NetworkingStore) CreateNetwork(ctx context.Context, network *ncproxynetworking.Network) error

func (*NetworkingStore) DeleteEndpoint

func (n *NetworkingStore) DeleteEndpoint(ctx context.Context, endpointName string) error

func (*NetworkingStore) DeleteNetwork

func (n *NetworkingStore) DeleteNetwork(ctx context.Context, networkName string) error

func (*NetworkingStore) GetEndpointByName

func (n *NetworkingStore) GetEndpointByName(ctx context.Context, endpointName string) (*ncproxynetworking.Endpoint, error)

func (*NetworkingStore) GetNetworkByName

func (n *NetworkingStore) GetNetworkByName(ctx context.Context, networkName string) (*ncproxynetworking.Network, error)

func (*NetworkingStore) ListEndpoints

func (n *NetworkingStore) ListEndpoints(ctx context.Context) (results []*ncproxynetworking.Endpoint, err error)

func (*NetworkingStore) ListNetworks

func (n *NetworkingStore) ListNetworks(ctx context.Context) (results []*ncproxynetworking.Network, err error)

func (*NetworkingStore) UpdateEndpoint

func (n *NetworkingStore) UpdateEndpoint(ctx context.Context, endpt *ncproxynetworking.Endpoint) error