Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct { DBType string `yaml:"db_type"` // DBType specifies the type of database to be used, e.g., "etcd". Endpoints []string `yaml:"endpoints"` // Endpoints defines the list of database endpoint URLs for connecting the API server to the database backend. Etcd Etcd `yaml:"etcd"` // Etcd contains the configuration details needed to connect to an Etcd cluster. TLSCert string `yaml:"tls_cert"` // TLSCert specifies the file path to the TLS certificate used for securing API server communication. TLSKey string `yaml:"tls_key"` // TLSKey specifies the file path to the TLS private key used for securing API server communication. GoBGPInstance string `yaml:"go_bgp_instance"` // GoBGPInstance specifies the endpoint of the GoBGP instance for API server communication. LogPath string `yaml:"log_path"` // LogPath specifies the file path to the log file for storing API server logs. Verbose int8 `yaml:"verbose"` // Verbose specifies the verbosity level for logging, where higher values produce more detailed logs. }
APIConfig represents the configuration parameters required to initialize and run the API server.
type Addresses ¶
type Addresses struct { SourceSubnets Subnet `json:"announced-address"` // SourceSubnets specifies the subnet from which the announced address should be obtained (IPAM). Zone string `json:"zone"` // Zone specifies the geographical or logical zone associated with the addresses. AnnouncedIP string `json:"announced-ip"` // AnnouncedIP specifies the IP address being announced for routing purposes. }
Addresses represents a collection of network-related data, including subnets, zone, and announcing ip.
type Announcement ¶
type Announcement struct { Meta Meta `json:"meta"` // Meta represents metadata information including a descriptive name and associated project for a BGP announcement. Addresses Addresses `json:"addresses"` // Addresses represents a collection of network-related data, including subnets, zone, and announcing ip. NextHops []Subnet `json:"next-hops"` // NextHops represents a collection of next-hop IP addresses used for routing purposes. HealthCheck HealthCheck `json:"health-check"` // HealthCheck represents the configuration and parameters for performing health checks on next hops. Status Status `json:"status"` // Status represents the current state of an announcement with details and a timestamp. }
Announcement represents a BGP routing configuration, including metadata, addresses, next-hop details, health checks, and status.
type Components ¶
Components represents a structure for tracking the state of various components with their enabled status.
type DatabaseAdapter ¶
type DatabaseAdapter interface { HealthCheck() error Get(key string) (string, error) Put(key, value string) error Patch(key, value string) error Watch(key string, stopChan <-chan struct{}) (<-chan clientv3.WatchResponse, error) Delete(key string) error }
DatabaseAdapter defines interface for database communication
type Details ¶
type Details struct { Host string `json:"host"` // Host represents the address associated with the next hop. Status string `json:"status"` // Status indicates the current health check result. Code int `json:"code"` // Code is the health check HTTP response status codes. Message string `json:"msg"` // Message provides additional details or context about the health check result. Timestamp string `json:"timestamp"` // Timestamp represents the time at which the status was recorded in ISO 8601 format. }
Details provides information about the health check results for a specific host, including its status and message.
type Etcd ¶
type Etcd struct { CACert string `yaml:"ca_cert"` // CACert specifies the file path to the CA certificate to establish secure communication with the Etcd cluster. ClientCert string `yaml:"client_cert"` // ClientCert specifies the file path to the client certificate for authenticating with the Etcd cluster. ClientKey string `yaml:"client_key"` // ClientKey specifies the file path to the client private key used for authenticating with the Etcd cluster. }
Etcd is a configuration structure used for specifying Etcd cluster connection parameters.
type HealthCheck ¶
type HealthCheck struct { Path string `json:"path"` // Path specifies the endpoint to be used for the health check process. Port int `json:"port"` // Port specifies the port number to be used for the health check process. Method string `json:"method"` // Method specifies the HTTP method to be used for the health check process. CheckInterval int `json:"interval"` // CheckInterval specifies the interval in seconds between consecutive health check attempts. Timeout int `json:"timeout"` // Timeout specifies the duration in seconds before a health check request times out. GracePeriod int `json:"grace-period"` // GracePeriod specifies the time in seconds to wait before marking the health check as failed after a disruption. }
HealthCheck is a configuration for performing health checks on the next hop.
type Meta ¶
type Meta struct { Name string `json:"name"` // Name specifies the descriptive name for the BGP announce. Project string `json:"project"` // Project specifies the project associated with the BGP announce. }
Meta represents metadata information including a descriptive name and associated project for a BGP announcement.
type Status ¶
type Status struct { Status string `json:"status"` // Status indicates the current operational state of the announcement. Details []Details `json:"details"` // Details gives a detailed description of the status of the announcement. Timestamp string `json:"timestamp"` // Timestamp represents the time at which the status was recorded in ISO 8601 format. }
Status represents the current state of an announcement with details and a timestamp.