models

package
v0.0.0-...-c8940be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultStatefulDirRel = ".go-reconciler-state"

Variables

This section is empty.

Functions

func ApplyChanges

func ApplyChanges(ctx context.Context, changeset pkgreconcile.ResourceListChangeSet) error

Types

type ControlplaneConfig

type ControlplaneConfig struct {
	// The container where the vtysh and FRR daemons are running, if it's nil then FRR is considered to be running
	// in the host netns.
	// However, there would be one host netns is allowed at most.
	ContainerName *string `yaml:"container_name,omitempty" json:"container_name,omitempty"`

	LogLevel *string `yaml:"log_level,omitempty" json:"log_level,omitempty"`

	DebugBGPUpdates  *bool `yaml:"debug_bgp_updates,omitempty" json:"debug_bgp_updates,omitempty"`
	DebugOSPFUpdates *bool `yaml:"debug_ospf_updates,omitempty" json:"debug_ospf_updates,omitempty"`
	DebugRPKI        *bool `yaml:"debug_rpki,omitempty" json:"debug_rpki,omitempty"`
	DebugZebraEvents *bool `yaml:"debug_zebra_events,omitempty" json:"debug_zebra_events,omitempty"`
	DebugZebraDplane *bool `yaml:"debug_zebra_dplane,omitempty" json:"debug_zebra_dplane,omitempty"`
	DebugZebraKernel *bool `yaml:"debug_zebra_kernel,omitempty" json:"debug_zebra_kernel,omitempty"`

	OSPFv2   []pkgprotocolospfv2.OSPFV2Config `yaml:"ospfv2,omitempty" json:"ospfv2,omitempty"`
	BGP      []pkgprotocolbgp.BGPConfig       `yaml:"bgp,omitempty" json:"bgp,omitempty"`
	RPKI     []pkgprotocolbgp.BGPRPKIConfig   `yaml:"rpki,omitempty" json:"rpki,omitempty"`
	RouteMap []pkgprotocolbgp.RouteMapConfig  `yaml:"route_maps,omitempty" json:"route_maps,omitempty"`
}

type GlobalConfig

type GlobalConfig struct {
	Nodes map[string]NodeConfig `yaml:"nodes" json:"nodes"`
}

type NodeConfig

type NodeConfig struct {

	// Resources field are use to define resource-like objects,
	// which means it can be created, updated, and deleted and the controller knows how to detect its existence as well as its changes (aka reconciliation)
	// To say, resource-like objects are simply those reconcile-able.
	Resources *ResourcesConfig `yaml:"resources,omitempty" json:"resources,omitempty"`
}

func (*NodeConfig) ToStatus

func (nodeConfig *NodeConfig) ToStatus(ctx context.Context) ([]*pkginterfacestub.StatusWrapper, error)

func (*NodeConfig) Up

func (nodeConfig *NodeConfig) Up(ctx context.Context, delete bool) (converged bool, err error)

type ResourcesConfig

type ResourcesConfig struct {
	// Route     *pkginterfaceroute.RouteConfigurationList         `yaml:"route_list,omitempty" json:"route_list,omitempty"`
	VXLAN     *pkginterfacevxlan.VXLANConfigurationList         `yaml:"vxlan,omitempty" json:"vxlan,omitempty"`
	VethPair  *pkginterfaceveth.VethPairConfigurationList       `yaml:"veth,omitempty" json:"veth,omitempty"`
	Bridge    *pkginterfacebridge.BridgeConfigurationList       `yaml:"bridge,omitempty" json:"bridge,omitempty"`
	Dummy     *pkginterfacedummy.DummyConfigurationList         `yaml:"dummy,omitempty" json:"dummy,omitempty"`
	VRF       *pkginterfacevrf.VRFConfigurationList             `yaml:"vrf_list,omitempty" json:"vrf_list,omitempty"`
	WireGuard *pkginterfacewireguard.WireGuardConfigurationList `yaml:"wireguard,omitempty" json:"wireguard,omitempty"`
	BirdBGP   *pkgbird.BirdBGPConfigurationList                 `yaml:"bird_bgp,omitempty" json:"bird_bgp,omitempty"`
}

func (*ResourcesConfig) DetectChanges

func (dpConfig *ResourcesConfig) DetectChanges(ctx context.Context, delete bool) (pkgreconcile.ResourceListChangeSet, error)

func (*ResourcesConfig) Reconcile

func (dpConfig *ResourcesConfig) Reconcile(ctx context.Context, delete bool) (converged bool, err error)

type WrappedResourceListChangeSet

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

func (*WrappedResourceListChangeSet) GetAddedResources

func (wrapped *WrappedResourceListChangeSet) GetAddedResources() []pkgreconcile.ResourceProvisioner

func (*WrappedResourceListChangeSet) GetRemovedResources

func (wrapped *WrappedResourceListChangeSet) GetRemovedResources() []pkgreconcile.ResourceCanceller

func (*WrappedResourceListChangeSet) GetUpdatedResources

func (wrapped *WrappedResourceListChangeSet) GetUpdatedResources() []pkgreconcile.InterfaceChangeSet

func (*WrappedResourceListChangeSet) HasUpdates

func (changeset *WrappedResourceListChangeSet) HasUpdates() bool

func (*WrappedResourceListChangeSet) Merge

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL