Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback func(u ProductUpdate) map[string]rc.ApplyStatus
Callback represents a function that can process a remote config update. A Callback function can be registered to a remote config client to automatically react upon receiving updates. This function returns the configuration processing status for each config file received through the update.
type Capability ¶
type Capability uint
Capability represents a bit index to be set in clientData.Capabilites in order to register a client for a specific capability
const ( // ASMActivation represents the capability to activate ASM through remote configuration ASMActivation Capability // ASMIPBlocking represents the capability for ASM to block requests based on user IP ASMIPBlocking // ASMDDRules represents the capability to update the rules used by the ASM WAF for threat detection ASMDDRules )
type Client ¶
type Client struct { ClientConfig // contains filtered or unexported fields }
A Client interacts with an Agent to update and track the state of remote configuration
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
NewClient creates a new remoteconfig Client
func (*Client) RegisterCallback ¶
RegisterCallback allows registering a callback that will be invoked when the client receives a configuration update for the specified product.
type ClientConfig ¶
type ClientConfig struct { // The address at which the agent is listening for remoteconfig update requests on AgentURL string // The semantic version of the user's application AppVersion string // The env this tracer is running in Env string // The time interval between two client polls to the agent for updates PollInterval time.Duration // A list of remote config products this client is interested in Products []string // The tracer's runtime id RuntimeID string // The name of the user's application ServiceName string // The semantic version of the tracer TracerVersion string // The base TUF root metadata file TUFRoot string // The capabilities of the client Capabilities []Capability // HTTP is the HTTP client used to receive config updates HTTP *http.Client }
ClientConfig contains the required values to configure a remoteconfig client
func DefaultClientConfig ¶
func DefaultClientConfig() ClientConfig
DefaultClientConfig returns the default remote config client configuration
type ProductUpdate ¶
ProductUpdate represents an update for a specific product. It is a map of file path to raw file content