Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPermanentError ¶
IsPermanentError checks if an error is a permanent error (410)
func IsTemporaryDisabled ¶
IsTemporaryDisabled checks if an error indicates temporary deployment disabled (403)
Types ¶
type BootstrapClaims ¶
type BootstrapClaims struct {
ComponentType string `json:"component_type"`
DeploymentID string `json:"deployment_id"`
jwt.RegisteredClaims
}
BootstrapClaims for parsing JWT to get issuer
type BootstrapClient ¶
type BootstrapClient struct {
// contains filtered or unexported fields
}
BootstrapClient handles bootstrap API calls
func NewBootstrapClient ¶
func NewBootstrapClient() *BootstrapClient
NewBootstrapClient creates a new bootstrap client
func (*BootstrapClient) Bootstrap ¶
func (c *BootstrapClient) Bootstrap(ctx context.Context, token string, machineID string) (*BootstrapResponse, error)
Bootstrap performs the bootstrap operation with issuer-based URL IMPORTANT: We use manual JWT parsing here due to Yaegi's incompatibility with jwt/v5 struct tags. See: https://github.com/traefik/yaegi/discussions/1548
type BootstrapRequest ¶
type BootstrapRequest struct {
BootstrapToken string `json:"bootstrap_token"`
ComponentType string `json:"component_type"`
ComponentVersion string `json:"component_version"`
MachineID string `json:"machine_id"`
Scopes []string `json:"scopes,omitempty"`
}
BootstrapRequest represents the bootstrap API request
type BootstrapResponse ¶
type BootstrapResponse struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
ConfigURL string `json:"config_url"`
LogsURL string `json:"logs_url,omitempty"`
}
BootstrapResponse represents the bootstrap API response
type ConfigClient ¶
type ConfigClient struct {
// contains filtered or unexported fields
}
ConfigClient handles configuration API calls
func NewConfigClient ¶
func NewConfigClient(baseURL string, tokenGetter func() string) *ConfigClient
NewConfigClient creates a new config client
func (*ConfigClient) GetEDLConfig ¶
func (c *ConfigClient) GetEDLConfig(ctx context.Context) (*EDLConfig, error)
GetEDLConfig fetches the EDL configuration
type EDLConfig ¶
type EDLConfig struct {
DeploymentID string `json:"deployment_id"`
Purpose string `json:"purpose"` // "allowlist", "blocklist", "other"
Direction string `json:"direction"`
UpdateFrequencySeconds int `json:"update_frequency_seconds"`
FirewallFormat string `json:"firewall_format"`
URLs EDLURLs `json:"urls"`
}
EDLConfig represents the EDL configuration