reporter

package
v0.0.0-...-8ffbc8e Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Once In-Use Image data has been gathered, this package reports the data to Nextlinux

Index

Constants

View Source
const ReportAPIPath = "v1/enterprise/ecs-inventory"

Variables

This section is empty.

Functions

func Post

func Post(report Report, nextlinuxDetails connection.NextlinuxInfo) error

This method does the actual Reporting (via HTTP) to Nextlinux

Types

type Container

type Container struct {
	ARN         string `json:"arn"`
	ImageDigest string `json:"image_digest"`
	ImageTag    string `json:"image_tag"`
	TaskARN     string `json:"task_arn,omitempty"`
}

type Report

type Report struct {
	Timestamp  string      `json:"timestamp"` // Should be generated using time.Now.UTC() and formatted according to RFC Y-M-DTH:M:SZ
	ClusterARN string      `json:"cluster_arn"`
	Containers []Container `json:"containers,omitempty"`
	Tasks      []Task      `json:"tasks,omitempty"`
	Services   []Service   `json:"services,omitempty"`
}

type Service

type Service struct {
	ARN  string            `json:"arn"`
	Tags map[string]string `json:"tags,omitempty"`
}

type Task

type Task struct {
	ARN        string            `json:"arn"`
	ServiceARN string            `json:"service_arn,omitempty"`
	Tags       map[string]string `json:"tags,omitempty"`
	TaskDefARN string            `json:"task_definition_arn,omitempty"`
}

Jump to

Keyboard shortcuts

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