Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateConnectionName ¶
func GenerateConnectionName(definition ConnectionDefinition, runnerName string) string
Types ¶
type ConnectionDefinition ¶
type ConnectionDefinition struct {
// FQNPrefix is the identifier used in allowlist matching
// Example: "com.datadoghq.script"
FQNPrefix string
// IntegrationType is the integration type sent to the API
// Example: "Kubernetes", "Script"
IntegrationType string
Credentials CredentialConfig
}
ConnectionDefinition defines all metadata needed to create a connection
func DetermineConnectionsToCreate ¶
func DetermineConnectionsToCreate(actionsAllowlist []string) []ConnectionDefinition
type ConnectionRequest ¶
type ConnectionRequest struct {
ID string `jsonapi:"primary,action_connection"`
Name string `jsonapi:"attribute" json:"name" validate:"required"`
RunnerID string `jsonapi:"attribute" json:"runner_id" validate:"required"`
Tags []string `jsonapi:"attribute" json:"tags"`
Integration IntegrationConfig `jsonapi:"attribute" json:"integration" validate:"required"`
}
type ConnectionsClient ¶
type ConnectionsClient struct {
// contains filtered or unexported fields
}
ConnectionsClient is an HTTP client for creating connections via the Datadog API.
func NewConnectionsAPIClient ¶
func NewConnectionsAPIClient(cfg model.Reader, ddSite, apiKey, appKey string) (*ConnectionsClient, error)
func (*ConnectionsClient) CreateConnection ¶
func (c *ConnectionsClient) CreateConnection(ctx context.Context, definition ConnectionDefinition, runnerID, runnerName string, tags []string) error
type ConnectionsCreator ¶
type ConnectionsCreator struct {
// contains filtered or unexported fields
}
func NewConnectionsCreator ¶
func NewConnectionsCreator(client ConnectionsClient, provider TagsProvider) ConnectionsCreator
func (ConnectionsCreator) AutoCreateConnections ¶
type CredentialConfig ¶
type IntegrationConfig ¶
type TagsProvider ¶
TagsProvider builds connection tags
func NewTagsProvider ¶
func NewTagsProvider(tagger tagger.Component) TagsProvider
NewTagsProvider creates a TagsProvider that uses the tagger component to get cluster tags
Click to show internal directories.
Click to hide internal directories.