Documentation ¶
Overview ¶
Package siderolink contains SideroLink controller resources.
Index ¶
- Constants
- func APIURL(cfg *ConnectionParams, useTunnel bool) (string, error)
- func KernelArgs(res *ConnectionParams) []string
- type Config
- type ConfigExtension
- type ConfigSpec
- type ConnectionParams
- type ConnectionParamsExtension
- type ConnectionParamsSpec
- type DeprecatedLinkCounter
- type DeprecatedLinkCounterExtension
- type DeprecatedLinkCounterSpec
- type Link
- type LinkExtension
- type LinkSpec
Constants ¶
const ( // ConfigType is the type of Config resource. // // tsgen:ConfigType ConfigType = resource.Type("Configs.omni.sidero.dev") // ConfigID is the config resource name. // // tsgen:ConfigID ConfigID = resource.ID("siderolink-config") )
const ConnectionParamsType = resource.Type("ConnectionParams.omni.sidero.dev")
ConnectionParamsType is the type of ConnectionParams resource.
tsgen:ConnectionParamsType
const CounterNamespace = resources.MetricsNamespace
CounterNamespace is the default namespace for the SideroLink counter resources.
tsgen:SiderolinkCounterNamespace
const DeprecatedLinkCounterType = resource.Type("LinkCounters.omni.sidero.dev")
DeprecatedLinkCounterType is the type of LinkCounter resource.
const LinkType = resource.Type("Links.omni.sidero.dev")
LinkType is the type of Link resource.
tsgen:SiderolinkResourceType
const Namespace = resources.DefaultNamespace
Namespace is the default namespace for the SideroLink resources.
Variables ¶
This section is empty.
Functions ¶
func APIURL ¶ added in v0.37.0
func APIURL(cfg *ConnectionParams, useTunnel bool) (string, error)
APIURL generates siderolink API URL from the connection params.
func KernelArgs ¶ added in v0.37.0
func KernelArgs(res *ConnectionParams) []string
KernelArgs returns the kernel args for the given ConnectionParams resource.
Types ¶
type Config ¶
type Config = typed.Resource[ConfigSpec, ConfigExtension]
Config resource keeps connected nodes state.
type ConfigExtension ¶
type ConfigExtension struct{}
ConfigExtension providers auxiliary methods for Config resource.
func (ConfigExtension) ResourceDefinition ¶
func (ConfigExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements typed.Extension interface.
type ConfigSpec ¶
type ConfigSpec = protobuf.ResourceSpec[specs.SiderolinkConfigSpec, *specs.SiderolinkConfigSpec]
ConfigSpec wraps specs.SiderolinkConfigSpec.
type ConnectionParams ¶
type ConnectionParams = typed.Resource[ConnectionParamsSpec, ConnectionParamsExtension]
ConnectionParams resource keeps generated kernel arguments as a resource.
ConnectionParams resource ID is a machine UUID.
func NewConnectionParams ¶
func NewConnectionParams(ns, id string) *ConnectionParams
NewConnectionParams creates new ConnectionParams state.
type ConnectionParamsExtension ¶
type ConnectionParamsExtension struct{}
ConnectionParamsExtension providers auxiliary methods for ConnectionParams resource.
func (ConnectionParamsExtension) ResourceDefinition ¶
func (ConnectionParamsExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements typed.Extension interface.
type ConnectionParamsSpec ¶
type ConnectionParamsSpec = protobuf.ResourceSpec[specs.ConnectionParamsSpec, *specs.ConnectionParamsSpec]
ConnectionParamsSpec wraps specs.ConnectionParamsSpec.
type DeprecatedLinkCounter ¶
type DeprecatedLinkCounter = typed.Resource[DeprecatedLinkCounterSpec, DeprecatedLinkCounterExtension]
DeprecatedLinkCounter resource was removed, but still used only in the migration code.
func NewDeprecatedLinkCounter ¶
func NewDeprecatedLinkCounter(ns, id string) *DeprecatedLinkCounter
NewDeprecatedLinkCounter creates new LinkCounter state.
type DeprecatedLinkCounterExtension ¶
type DeprecatedLinkCounterExtension struct{}
DeprecatedLinkCounterExtension providers auxiliary methods for LinkCounter resource.
func (DeprecatedLinkCounterExtension) ResourceDefinition ¶
func (DeprecatedLinkCounterExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements typed.Extension interface.
type DeprecatedLinkCounterSpec ¶
type DeprecatedLinkCounterSpec = protobuf.ResourceSpec[specs.SiderolinkCounterSpec, *specs.SiderolinkCounterSpec]
DeprecatedLinkCounterSpec wraps specs.SiderolinkSpec.
type Link ¶
type Link = typed.Resource[LinkSpec, LinkExtension]
Link resource keeps connected nodes state.
Link resource ID is a machine UUID.
type LinkExtension ¶
type LinkExtension struct{}
LinkExtension providers auxiliary methods for Link resource.
func (LinkExtension) ResourceDefinition ¶
func (LinkExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements typed.Extension interface.
type LinkSpec ¶
type LinkSpec = protobuf.ResourceSpec[specs.SiderolinkSpec, *specs.SiderolinkSpec]
LinkSpec wraps specs.SiderolinkSpec.