Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct { // Shutdown Context ShutdownCtx context.Context // Databases DB *db.DB // BGP server BGP *bgp.Server // DNS server DNS *dns.Server // OS access OS *sys.OS Proxy func(req *http.Request) (*url.URL, error) // REST endpoints Endpoints *endpoints.Endpoints // Event server DevIncusEvents *events.DevIncusServer Events *events.Server // Firewall instance Firewall firewall.Firewall // Server certificate ServerCert func() *localtls.CertInfo UpdateCertificateCache func() // Available instance types based on operational drivers. InstanceTypes map[instancetype.Type]error // Filesystem monitor DevMonitor fsmonitor.FSMonitor // Global configuration GlobalConfig *clusterConfig.Config // Local configuration LocalConfig *node.Config // Local server name. ServerName string // Whether the server is clustered. ServerClustered bool // Local server start time. StartTime time.Time // Authorizer. Authorizer auth.Authorizer // OVN. OVNNB *ovn.NB OVNSB *ovn.SB }
State is a gateway to the two main stateful components, the database and the operating system. It's typically used by model entities such as containers, volumes, etc. in order to perform changes.
func NewTestState ¶
NewTestState returns a State object initialized with testable instances of the node/cluster databases and of the OS facade.
Return the newly created State object, along with a function that can be used for cleaning it up.
Click to show internal directories.
Click to hide internal directories.