types

package
v0.0.0-...-102d8e4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package types provides the different types used by other component to provider remote-config task listeners.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentTaskConfig

type AgentTaskConfig struct {
	Config   agentTaskData
	Metadata state.Metadata
}

AgentTaskConfig is a deserialized agent task configuration file along with the associated metadata

func ParseConfigAgentTask

func ParseConfigAgentTask(data []byte, metadata state.Metadata) (AgentTaskConfig, error)

ParseConfigAgentTask parses an agent task config

type ListenerProvider

type ListenerProvider struct {
	fx.Out

	ListenerProvider RCListener `group:"rCListener"`
}

ListenerProvider defines component that can receive RC updates for any product

type RCAgentTaskListener

type RCAgentTaskListener func(taskType TaskType, task AgentTaskConfig) (bool, error)

RCAgentTaskListener is the FX-compatible listener, so RC can push updates through it

type RCListener

type RCListener map[data.Product]func(updates map[string]state.RawConfig, applyStateCallback func(string, state.ApplyStatus))

RCListener is the generic type for components to register a callback for any product

type TaskListenerProvider

type TaskListenerProvider struct {
	fx.Out

	Listener RCAgentTaskListener `group:"rCAgentTaskListener"`
}

TaskListenerProvider defines component that can receive RC updates

func NewTaskListener

func NewTaskListener(listener RCAgentTaskListener) TaskListenerProvider

NewTaskListener returns a TaskListenerProvider registering a RCAgentTaskListener listener to the RC group.

type TaskType

type TaskType string

TaskType contains the type of the remote config task to execute

const (
	// TaskFlare is the task sent to request a flare from the agent
	TaskFlare TaskType = "flare"
)

Jump to

Keyboard shortcuts

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