var ( ErrBucketNotFound = errors.New("bucket not found") ErrKeyNotFound = errors.New("key does not exist") )
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(db *bolt.DB) *ComputeAgentStore
func (c *ComputeAgentStore) Close() error
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 (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 (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 (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 struct {
// contains filtered or unexported fields
}
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