Documentation ¶
Overview ¶
Package ifacestate implements the manager and state aspects responsible for the maintenance of interfaces the system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Disconnect ¶
func Disconnect(s *state.State, plugSnap, plugName, slotSnap, slotName string) (*state.TaskSet, error)
Disconnect returns a set of tasks for disconnecting an interface.
func MockSecurityBackends ¶
func MockSecurityBackends(be []interfaces.SecurityBackend) func()
MockSecurityBackends mocks the list of security backends that are used for setting up security.
This function is public because it is referenced in the daemon
Types ¶
type InterfaceManager ¶
type InterfaceManager struct {
// contains filtered or unexported fields
}
InterfaceManager is responsible for the maintenance of interfaces in the system state. It maintains interface connections, and also observes installed snaps to track the current set of available plugs and slots.
func Manager ¶
func Manager(s *state.State, extra []interfaces.Interface) (*InterfaceManager, error)
Manager returns a new InterfaceManager. Extra interfaces can be provided for testing.
func (*InterfaceManager) Ensure ¶
func (m *InterfaceManager) Ensure() error
Ensure implements StateManager.Ensure.
func (*InterfaceManager) Repository ¶
func (m *InterfaceManager) Repository() *interfaces.Repository
Repository returns the interface repository used internally by the manager.
This method has two use-cases: - it is needed for setting up state in daemon tests - it is needed to return the set of known interfaces in the daemon api
In the second case it is only informational and repository has internal locks to ensure consistency.
func (*InterfaceManager) Stop ¶
func (m *InterfaceManager) Stop()
Stop implements StateManager.Stop.
func (*InterfaceManager) Wait ¶
func (m *InterfaceManager) Wait()
Wait implements StateManager.Wait.