Documentation
¶
Index ¶
- Constants
- type ActivityRecord
- type AgentConnection
- type AgentDeployment
- type Connection
- type ConnectionStatus
- type ConnectionView
- type ContainerMetric
- type DockerConnection
- type DockerMount
- type DockerNetworkAttachment
- type DockerPort
- type DockerWorkload
- type HTTPProxyConnection
- type Inventory
- type KubernetesConnection
- type MetricRequest
- type ProviderInfo
- type SSHConnection
- type SSHProfile
- type Settings
- type StreamRequest
- type Workload
- type WorkloadMetric
Constants ¶
View Source
const ( ConnectionKubernetes = "kubernetes" ConnectionDocker = "docker" ModeDirect = "direct" ModeAgent = "agent" AccessReadOnly = "read_only" AccessManage = "manage" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityRecord ¶
type ActivityRecord struct {
Sequence uint64 `json:"sequence,omitempty"`
Timestamp time.Time `json:"timestamp"`
Type string `json:"type"`
Level string `json:"level,omitempty"`
Message string `json:"message"`
Source string `json:"source,omitempty"`
Pod string `json:"pod,omitempty"`
Container string `json:"container,omitempty"`
Fields map[string]any `json:"fields,omitempty"`
}
type AgentConnection ¶
type AgentConnection struct {
TokenHash string `json:"token_hash,omitempty"`
LastSeen time.Time `json:"last_seen,omitempty"`
Version string `json:"version,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
RunMode string `json:"run_mode,omitempty"` // persistent | temporary
ServerURL string `json:"server_url,omitempty"`
Image string `json:"image,omitempty"`
Namespaces []string `json:"namespaces,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
}
type AgentDeployment ¶
type AgentDeployment struct {
BootstrapConnectionID string `json:"bootstrap_connection_id"`
Mode string `json:"mode"` // persistent | temporary
Transport string `json:"transport,omitempty"` // direct | ssh
TargetKind string `json:"target_kind,omitempty"`
AgentNamespace string `json:"agent_namespace"`
ResourceName string `json:"resource_name"`
RoleName string `json:"role_name"`
Namespaces []string `json:"namespaces,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
Image string `json:"image"`
ServerURL string `json:"server_url"`
ManifestSecret string `json:"manifest_secret,omitempty"`
RemoteKubeconfigPath string `json:"remote_kubeconfig_path,omitempty"`
RemoteKubectlPath string `json:"remote_kubectl_path,omitempty"`
DockerSocketPath string `json:"docker_socket_path,omitempty"`
}
type Connection ¶
type Connection struct {
ID string `json:"id"`
Name string `json:"name"`
Kind string `json:"kind"`
Mode string `json:"mode"`
AccessMode string `json:"access_mode,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Kubernetes *KubernetesConnection `json:"kubernetes,omitempty"`
Docker *DockerConnection `json:"docker,omitempty"`
Agent *AgentConnection `json:"agent,omitempty"`
SSH *SSHConnection `json:"ssh,omitempty"`
HTTPProxy *HTTPProxyConnection `json:"http_proxy,omitempty"`
Deployment *AgentDeployment `json:"deployment,omitempty"`
}
func (Connection) CanManageDocker ¶ added in v0.1.2
func (c Connection) CanManageDocker() bool
func (Connection) Redacted ¶
func (c Connection) Redacted() Connection
type ConnectionStatus ¶
type ConnectionView ¶
type ConnectionView struct {
Connection
Status ConnectionStatus `json:"status"`
}
type ContainerMetric ¶
type ContainerMetric struct {
Pod string `json:"pod,omitempty"`
Container string `json:"container"`
CPUCores float64 `json:"cpu_cores,omitempty"`
CPUPercent *float64 `json:"cpu_percent,omitempty"`
MemoryBytes int64 `json:"memory_bytes,omitempty"`
MemoryLimitBytes int64 `json:"memory_limit_bytes,omitempty"`
NetworkReceiveBytes int64 `json:"network_receive_bytes,omitempty"`
NetworkTransmitBytes int64 `json:"network_transmit_bytes,omitempty"`
BlockReadBytes int64 `json:"block_read_bytes,omitempty"`
BlockWriteBytes int64 `json:"block_write_bytes,omitempty"`
PIDs int64 `json:"pids,omitempty"`
}
type DockerConnection ¶
type DockerMount ¶
type DockerMount struct {
Type string `json:"type"`
Name string `json:"name,omitempty"`
Source string `json:"source,omitempty"`
Destination string `json:"destination"`
Driver string `json:"driver,omitempty"`
Mode string `json:"mode,omitempty"`
Propagation string `json:"propagation,omitempty"`
ReadOnly bool `json:"read_only,omitempty"`
}
type DockerNetworkAttachment ¶
type DockerNetworkAttachment struct {
Name string `json:"name"`
NetworkID string `json:"network_id,omitempty"`
EndpointID string `json:"endpoint_id,omitempty"`
Gateway string `json:"gateway,omitempty"`
IPAddress string `json:"ip_address,omitempty"`
GlobalIPv6Address string `json:"global_ipv6_address,omitempty"`
Aliases []string `json:"aliases,omitempty"`
}
type DockerPort ¶
type DockerWorkload ¶
type DockerWorkload struct {
ComposeProject string `json:"compose_project,omitempty"`
ComposeService string `json:"compose_service,omitempty"`
ComposeContainerNumber string `json:"compose_container_number,omitempty"`
ComposeWorkingDir string `json:"compose_working_dir,omitempty"`
ComposeConfigFiles string `json:"compose_config_files,omitempty"`
ComposeVersion string `json:"compose_version,omitempty"`
DependsOn []string `json:"depends_on,omitempty"`
Hostname string `json:"hostname,omitempty"`
NetworkMode string `json:"network_mode,omitempty"`
Networks []DockerNetworkAttachment `json:"networks,omitempty"`
Mounts []DockerMount `json:"mounts,omitempty"`
Ports []DockerPort `json:"ports,omitempty"`
}
type HTTPProxyConnection ¶
type KubernetesConnection ¶
type KubernetesConnection struct {
KubeconfigSource string `json:"kubeconfig_source,omitempty"` // path | stored
KubeconfigPath string `json:"kubeconfig_path,omitempty"`
KubeconfigSecret string `json:"kubeconfig_secret,omitempty"`
Context string `json:"context,omitempty"`
KubectlPath string `json:"kubectl_path,omitempty"`
NamespaceMode string `json:"namespace_mode,omitempty"` // all | selected
Namespaces []string `json:"namespaces,omitempty"`
ExecPolicy string `json:"exec_policy,omitempty"` // deny | allowlist | allow
ExecAllowlist []string `json:"exec_allowlist,omitempty"`
EnvironmentSecret string `json:"environment_secret,omitempty"`
}
type MetricRequest ¶
type MetricRequest struct {
ConnectionID string `json:"connection_id"`
Kind string `json:"kind"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name"`
IntervalSeconds int `json:"interval_seconds,omitempty"`
}
func (MetricRequest) Key ¶
func (r MetricRequest) Key() string
type ProviderInfo ¶
type SSHConnection ¶
type SSHConnection struct {
Host string `json:"host"`
Port int `json:"port,omitempty"`
User string `json:"user,omitempty"`
PrivateKeySecret string `json:"private_key_secret,omitempty"`
KnownHostsPath string `json:"known_hosts_path,omitempty"`
HostKeyPolicy string `json:"host_key_policy,omitempty"` // strict | accept-new
ProxyJump string `json:"proxy_jump,omitempty"`
}
type SSHProfile ¶
type SSHProfile struct {
ID string `json:"id"`
Name string `json:"name"`
Host string `json:"host"`
Port int `json:"port,omitempty"`
User string `json:"user,omitempty"`
PrivateKeySecret string `json:"private_key_secret,omitempty"`
HasPrivateKey bool `json:"has_private_key,omitempty"`
KnownHostsPath string `json:"known_hosts_path,omitempty"`
HostKeyPolicy string `json:"host_key_policy,omitempty"` // strict | accept-new
ProxyJump string `json:"proxy_jump,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (SSHProfile) Redacted ¶
func (profile SSHProfile) Redacted() SSHProfile
type Settings ¶
type Settings struct {
DefaultTailLines int `json:"default_tail_lines"`
DefaultAgentImage string `json:"default_agent_image,omitempty"`
PublicURL string `json:"public_url,omitempty"`
KubectlPath string `json:"kubectl_path,omitempty"`
ExecPluginPolicy string `json:"exec_plugin_policy"`
ExecPluginAllowlist []string `json:"exec_plugin_allowlist,omitempty"`
OverviewMetricsIntervalSeconds int `json:"overview_metrics_interval_seconds"`
SelectedMetricsIntervalSeconds int `json:"selected_metrics_interval_seconds"`
}
func DefaultSettings ¶
func DefaultSettings() Settings
type StreamRequest ¶
type StreamRequest struct {
ConnectionID string `json:"connection_id"`
Kind string `json:"kind"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name"`
Pod string `json:"pod,omitempty"`
Container string `json:"container,omitempty"`
TailLines int `json:"tail_lines,omitempty"`
Previous bool `json:"previous,omitempty"`
Events bool `json:"events,omitempty"`
}
func (StreamRequest) Key ¶
func (r StreamRequest) Key() string
type Workload ¶
type Workload struct {
ConnectionID string `json:"connection_id"`
Connection string `json:"connection"`
Platform string `json:"platform"`
Kind string `json:"kind"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name"`
UID string `json:"uid,omitempty"`
State string `json:"state"`
Severity string `json:"severity"`
Ready int `json:"ready,omitempty"`
Desired int `json:"desired,omitempty"`
Restarts int `json:"restarts,omitempty"`
Images []string `json:"images,omitempty"`
Containers []string `json:"containers,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Selector string `json:"selector,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
Docker *DockerWorkload `json:"docker,omitempty"`
}
type WorkloadMetric ¶
type WorkloadMetric struct {
Sequence uint64 `json:"sequence,omitempty"`
Timestamp time.Time `json:"timestamp"`
ConnectionID string `json:"connection_id"`
Connection string `json:"connection,omitempty"`
Platform string `json:"platform"`
Kind string `json:"kind"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name"`
Source string `json:"source"`
Error string `json:"error,omitempty"`
CPUCores float64 `json:"cpu_cores,omitempty"`
CPUPercent *float64 `json:"cpu_percent,omitempty"`
MemoryBytes int64 `json:"memory_bytes,omitempty"`
MemoryLimitBytes int64 `json:"memory_limit_bytes,omitempty"`
NetworkReceiveBytes int64 `json:"network_receive_bytes,omitempty"`
NetworkTransmitBytes int64 `json:"network_transmit_bytes,omitempty"`
BlockReadBytes int64 `json:"block_read_bytes,omitempty"`
BlockWriteBytes int64 `json:"block_write_bytes,omitempty"`
PIDs int64 `json:"pids,omitempty"`
Containers []ContainerMetric `json:"containers,omitempty"`
}
func (WorkloadMetric) Key ¶
func (m WorkloadMetric) Key() string
Click to show internal directories.
Click to hide internal directories.