Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Valid log levels are: DEBUG, INFO, WARN, ERROR, FATAL and PANIC CIDR string `required:"true" desc:"set the metal core CIDR"` PartitionID string `required:"true" desc:"set the partition ID" envconfig:"partition_id"` RackID string `required:"true" desc:"set the rack ID" envconfig:"rack_id"` BindAddress string `required:"false" default:"0.0.0.0" desc:"set server bind address" split_words:"true"` MetricsServerPort int `required:"false" default:"2112" desc:"the port of the metrics server" split_words:"true"` MetricsServerBindAddress string `required:"false" default:"0.0.0.0" desc:"the bind addr of the metrics server" split_words:"true"` LogLevel string `required:"false" default:"info" desc:"set log level" split_words:"true"` ApiProtocol string `required:"false" default:"http" desc:"set metal api protocol" envconfig:"metal_api_protocol"` ApiIP string `required:"false" default:"localhost" desc:"set metal api address" envconfig:"metal_api_ip"` ApiPort int `required:"false" default:"8080" desc:"set metal api port" envconfig:"metal_api_port"` ApiBasePath string `required:"false" default:"" desc:"set metal api basepath" envconfig:"metal_api_basepath"` LoopbackIP string `required:"false" default:"10.0.0.11" desc:"set the loopback ip address that is used with BGP unnumbered" split_words:"true"` ASN string `required:"false" default:"420000011" desc:"set the ASN that is used with BGP"` SpineUplinks []string `required:"false" default:"swp31,swp32" desc:"set the ports that are connected to spines" envconfig:"spine_uplinks"` ManagementGateway string `required:"false" default:"" desc:"the default gateway for the management network" split_words:"true"` ReconfigureSwitch bool `required:"false" default:"false" desc:"let metal-core reconfigure the switch" split_words:"true"` ReconfigureSwitchInterval time.Duration `required:"false" default:"10s" desc:"pull interval to fetch and apply switch configuration" split_words:"true"` AdditionalBridgeVIDs []string `` /* 129-byte string literal not displayed */ AdditionalBridgePorts []string `` /* 134-byte string literal not displayed */ InterfacesTplFile string `` /* 162-byte string literal not displayed */ FrrTplFile string `` /* 149-byte string literal not displayed */ HMACKey string `required:"true" desc:"the preshared key for the hmac calculation" envconfig:"hmac_key"` GrpcAddress string `required:"true" default:"" desc:"the gRPC address" envconfig:"grpc_address"` GrpcCACertFile string `required:"false" desc:"the gRPC CA certificate file" envconfig:"grpc_ca_cert_file"` GrpcClientCertFile string `required:"false" desc:"the gRPC client certificate file" envconfig:"grpc_client_cert_file"` GrpcClientKeyFile string `required:"false" desc:"the gRPC client key file" envconfig:"grpc_client_key_file"` PXEVlanID uint16 `required:"false" default:"4000" desc:"the id of the pxe vlan" envconfig:"pxe_vlan_id"` AdditionalRouteMapCIDRs []string `` /* 203-byte string literal not displayed */ }
type GrpcClient ¶
type GrpcClient struct {
// contains filtered or unexported fields
}
func NewGrpcClient ¶
NewGrpcClient fetches the address and certificates from metal-core needed to communicate with metal-api via grpc, and returns a new grpc client that can be used to invoke all provided grpc endpoints.
func (*GrpcClient) NewEventClient ¶
func (c *GrpcClient) NewEventClient() v1.EventServiceClient
Click to show internal directories.
Click to hide internal directories.