proto

package
v0.0.0-...-66042dd Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentService_Register_FullMethodName                = "/agent.AgentService/Register"
	AgentService_Heartbeat_FullMethodName               = "/agent.AgentService/Heartbeat"
	AgentService_StreamJobs_FullMethodName              = "/agent.AgentService/StreamJobs"
	AgentService_ReportJobStatus_FullMethodName         = "/agent.AgentService/ReportJobStatus"
	AgentService_ReportDestinationStatus_FullMethodName = "/agent.AgentService/ReportDestinationStatus"
	AgentService_StreamLogs_FullMethodName              = "/agent.AgentService/StreamLogs"
	AgentService_ReportVolumeList_FullMethodName        = "/agent.AgentService/ReportVolumeList"
	AgentService_ReportSnapshotBrowse_FullMethodName    = "/agent.AgentService/ReportSnapshotBrowse"
	AgentService_ReportSnapshotImport_FullMethodName    = "/agent.AgentService/ReportSnapshotImport"
)

Variables

View Source
var (
	JobType_name = map[int32]string{
		0: "JOB_TYPE_UNSPECIFIED",
		1: "JOB_TYPE_BACKUP",
		2: "JOB_TYPE_VERIFY",
		3: "JOB_TYPE_RESTORE",
		4: "JOB_TYPE_FORGET",
		5: "JOB_TYPE_LIST_VOLUMES",
		6: "JOB_TYPE_LIST_SNAPSHOT_FILES",
		7: "JOB_TYPE_IMPORT_SNAPSHOTS",
		8: "JOB_TYPE_CANCEL",
	}
	JobType_value = map[string]int32{
		"JOB_TYPE_UNSPECIFIED":         0,
		"JOB_TYPE_BACKUP":              1,
		"JOB_TYPE_VERIFY":              2,
		"JOB_TYPE_RESTORE":             3,
		"JOB_TYPE_FORGET":              4,
		"JOB_TYPE_LIST_VOLUMES":        5,
		"JOB_TYPE_LIST_SNAPSHOT_FILES": 6,
		"JOB_TYPE_IMPORT_SNAPSHOTS":    7,
		"JOB_TYPE_CANCEL":              8,
	}
)

Enum value maps for JobType.

View Source
var (
	JobStatus_name = map[int32]string{
		0: "JOB_STATUS_UNSPECIFIED",
		1: "JOB_STATUS_RUNNING",
		2: "JOB_STATUS_COMPLETED",
		3: "JOB_STATUS_FAILED",
		4: "JOB_STATUS_CANCELLED",
	}
	JobStatus_value = map[string]int32{
		"JOB_STATUS_UNSPECIFIED": 0,
		"JOB_STATUS_RUNNING":     1,
		"JOB_STATUS_COMPLETED":   2,
		"JOB_STATUS_FAILED":      3,
		"JOB_STATUS_CANCELLED":   4,
	}
)

Enum value maps for JobStatus.

View Source
var (
	LogLevel_name = map[int32]string{
		0: "LOG_LEVEL_UNSPECIFIED",
		1: "LOG_LEVEL_DEBUG",
		2: "LOG_LEVEL_INFO",
		3: "LOG_LEVEL_WARN",
		4: "LOG_LEVEL_ERROR",
	}
	LogLevel_value = map[string]int32{
		"LOG_LEVEL_UNSPECIFIED": 0,
		"LOG_LEVEL_DEBUG":       1,
		"LOG_LEVEL_INFO":        2,
		"LOG_LEVEL_WARN":        3,
		"LOG_LEVEL_ERROR":       4,
	}
)

Enum value maps for LogLevel.

View Source
var AgentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agent.AgentService",
	HandlerType: (*AgentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _AgentService_Register_Handler,
		},
		{
			MethodName: "Heartbeat",
			Handler:    _AgentService_Heartbeat_Handler,
		},
		{
			MethodName: "ReportJobStatus",
			Handler:    _AgentService_ReportJobStatus_Handler,
		},
		{
			MethodName: "ReportDestinationStatus",
			Handler:    _AgentService_ReportDestinationStatus_Handler,
		},
		{
			MethodName: "ReportVolumeList",
			Handler:    _AgentService_ReportVolumeList_Handler,
		},
		{
			MethodName: "ReportSnapshotBrowse",
			Handler:    _AgentService_ReportSnapshotBrowse_Handler,
		},
		{
			MethodName: "ReportSnapshotImport",
			Handler:    _AgentService_ReportSnapshotImport_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamJobs",
			Handler:       _AgentService_StreamJobs_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "StreamLogs",
			Handler:       _AgentService_StreamLogs_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "agent.proto",
}

AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_agent_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServiceServer

func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)

Types

type AgentCapabilities

type AgentCapabilities struct {

	// docker is true when the agent can reach the Docker socket and discover volumes.
	// Requires the Docker socket to be mounted (read-only) into the agent container.
	Docker bool `protobuf:"varint,1,opt,name=docker,proto3" json:"docker,omitempty"`
	// restic is true when the restic binary is found in PATH.
	// Required for all backup, verify, restore, and forget jobs.
	Restic bool `protobuf:"varint,2,opt,name=restic,proto3" json:"restic,omitempty"`
	// rclone is true when the rclone binary is found in PATH.
	// Required for destinations not natively supported by restic.
	Rclone bool `protobuf:"varint,3,opt,name=rclone,proto3" json:"rclone,omitempty"`
	// contains filtered or unexported fields
}

AgentCapabilities describes which optional features are available on the agent. Capabilities depend on the binaries installed on the host or container image.

func (*AgentCapabilities) Descriptor deprecated

func (*AgentCapabilities) Descriptor() ([]byte, []int)

Deprecated: Use AgentCapabilities.ProtoReflect.Descriptor instead.

func (*AgentCapabilities) GetDocker

func (x *AgentCapabilities) GetDocker() bool

func (*AgentCapabilities) GetRclone

func (x *AgentCapabilities) GetRclone() bool

func (*AgentCapabilities) GetRestic

func (x *AgentCapabilities) GetRestic() bool

func (*AgentCapabilities) ProtoMessage

func (*AgentCapabilities) ProtoMessage()

func (*AgentCapabilities) ProtoReflect

func (x *AgentCapabilities) ProtoReflect() protoreflect.Message

func (*AgentCapabilities) Reset

func (x *AgentCapabilities) Reset()

func (*AgentCapabilities) String

func (x *AgentCapabilities) String() string

type AgentServiceClient

type AgentServiceClient interface {
	// Register is called once when the agent first connects or reconnects after
	// a network interruption. The server upserts the agent record in the database
	// and returns the agent's persistent UUID and display name.
	//
	// Agents should store the returned agent_id locally and reuse it on
	// subsequent Register calls so the server can match them to the existing record.
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	// Heartbeat is called periodically by the agent (recommended interval: 30s)
	// to signal liveness and report lightweight system metrics.
	//
	// The server updates the agent's last_seen_at timestamp on every heartbeat.
	// If the server has pending jobs for this agent, it sets has_pending_jobs=true
	// in the response as a nudge — the job will arrive on the open StreamJobs stream.
	Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error)
	// StreamJobs opens a persistent server-streaming RPC that stays alive for the
	// entire duration of the agent's session. The server pushes JobAssignment
	// messages onto this stream whenever the scheduler dispatches a job to the agent.
	//
	// The agent should reconnect with exponential backoff if the stream closes
	// unexpectedly (network drop, server restart, etc.).
	StreamJobs(ctx context.Context, in *StreamJobsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[JobAssignment], error)
	// ReportJobStatus is called by the agent to notify the server of job lifecycle
	// transitions: RUNNING when execution starts, then COMPLETED or FAILED when done.
	// Intermediate RUNNING calls can carry a progress message for the UI.
	ReportJobStatus(ctx context.Context, in *JobStatusReport, opts ...grpc.CallOption) (*JobStatusResponse, error)
	// ReportDestinationStatus is called by the agent once per destination after
	// the backup to that destination completes or fails. It carries the restic
	// snapshot ID and byte counts extracted from the restic --json summary event.
	ReportDestinationStatus(ctx context.Context, in *DestinationStatusReport, opts ...grpc.CallOption) (*DestinationStatusResponse, error)
	// StreamLogs ships log lines produced during job execution to the server in
	// real-time using client-streaming. The server buffers entries in memory and
	// flushes them to the database in bulk when the stream closes (job done).
	//
	// This avoids N individual INSERT calls during execution.
	// See server/internal/repository/job.go for the bulk insert implementation.
	StreamLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LogEntry, LogStreamResponse], error)
	// ReportVolumeList is called by the agent in response to a JOB_TYPE_LIST_VOLUMES
	// assignment. The agent lists Docker volumes on its host and sends the results
	// back to the server, which correlates the response to the waiting REST request
	// via the correlation_id carried in the job_id field of the JobAssignment.
	ReportVolumeList(ctx context.Context, in *VolumeListReport, opts ...grpc.CallOption) (*VolumeListResponse, error)
	// ReportSnapshotBrowse is called by the agent in response to a
	// JOB_TYPE_LIST_SNAPSHOT_FILES assignment. The agent runs restic ls on the
	// snapshot and returns the file/directory entries. The server correlates the
	// response to the waiting REST request via the correlation_id.
	ReportSnapshotBrowse(ctx context.Context, in *SnapshotBrowseReport, opts ...grpc.CallOption) (*SnapshotBrowseResponse, error)
	// ReportSnapshotImport is called by the agent in response to a
	// JOB_TYPE_IMPORT_SNAPSHOTS assignment. The agent runs restic snapshots on the
	// destination and returns all snapshot metadata for the server to persist.
	ReportSnapshotImport(ctx context.Context, in *SnapshotImportReport, opts ...grpc.CallOption) (*SnapshotImportResponse, error)
}

AgentServiceClient is the client API for AgentService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

AgentService is the gRPC service implemented by the server.

Architecture note: Arkeep uses a pull model — agents always initiate the connection to the server, never the other way around. This means agents can run behind NAT or firewalls without exposing any port.

Typical agent lifecycle:

  1. Agent starts and calls Register to announce itself.
  2. Agent opens a persistent StreamJobs stream to receive job assignments.
  3. Agent sends periodic Heartbeat calls to signal liveness and report metrics.
  4. When a job arrives via StreamJobs, the agent executes it and calls ReportJobStatus for progress updates and StreamLogs for real-time logs.

type AgentServiceServer

type AgentServiceServer interface {
	// Register is called once when the agent first connects or reconnects after
	// a network interruption. The server upserts the agent record in the database
	// and returns the agent's persistent UUID and display name.
	//
	// Agents should store the returned agent_id locally and reuse it on
	// subsequent Register calls so the server can match them to the existing record.
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	// Heartbeat is called periodically by the agent (recommended interval: 30s)
	// to signal liveness and report lightweight system metrics.
	//
	// The server updates the agent's last_seen_at timestamp on every heartbeat.
	// If the server has pending jobs for this agent, it sets has_pending_jobs=true
	// in the response as a nudge — the job will arrive on the open StreamJobs stream.
	Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
	// StreamJobs opens a persistent server-streaming RPC that stays alive for the
	// entire duration of the agent's session. The server pushes JobAssignment
	// messages onto this stream whenever the scheduler dispatches a job to the agent.
	//
	// The agent should reconnect with exponential backoff if the stream closes
	// unexpectedly (network drop, server restart, etc.).
	StreamJobs(*StreamJobsRequest, grpc.ServerStreamingServer[JobAssignment]) error
	// ReportJobStatus is called by the agent to notify the server of job lifecycle
	// transitions: RUNNING when execution starts, then COMPLETED or FAILED when done.
	// Intermediate RUNNING calls can carry a progress message for the UI.
	ReportJobStatus(context.Context, *JobStatusReport) (*JobStatusResponse, error)
	// ReportDestinationStatus is called by the agent once per destination after
	// the backup to that destination completes or fails. It carries the restic
	// snapshot ID and byte counts extracted from the restic --json summary event.
	ReportDestinationStatus(context.Context, *DestinationStatusReport) (*DestinationStatusResponse, error)
	// StreamLogs ships log lines produced during job execution to the server in
	// real-time using client-streaming. The server buffers entries in memory and
	// flushes them to the database in bulk when the stream closes (job done).
	//
	// This avoids N individual INSERT calls during execution.
	// See server/internal/repository/job.go for the bulk insert implementation.
	StreamLogs(grpc.ClientStreamingServer[LogEntry, LogStreamResponse]) error
	// ReportVolumeList is called by the agent in response to a JOB_TYPE_LIST_VOLUMES
	// assignment. The agent lists Docker volumes on its host and sends the results
	// back to the server, which correlates the response to the waiting REST request
	// via the correlation_id carried in the job_id field of the JobAssignment.
	ReportVolumeList(context.Context, *VolumeListReport) (*VolumeListResponse, error)
	// ReportSnapshotBrowse is called by the agent in response to a
	// JOB_TYPE_LIST_SNAPSHOT_FILES assignment. The agent runs restic ls on the
	// snapshot and returns the file/directory entries. The server correlates the
	// response to the waiting REST request via the correlation_id.
	ReportSnapshotBrowse(context.Context, *SnapshotBrowseReport) (*SnapshotBrowseResponse, error)
	// ReportSnapshotImport is called by the agent in response to a
	// JOB_TYPE_IMPORT_SNAPSHOTS assignment. The agent runs restic snapshots on the
	// destination and returns all snapshot metadata for the server to persist.
	ReportSnapshotImport(context.Context, *SnapshotImportReport) (*SnapshotImportResponse, error)
	// contains filtered or unexported methods
}

AgentServiceServer is the server API for AgentService service. All implementations must embed UnimplementedAgentServiceServer for forward compatibility.

AgentService is the gRPC service implemented by the server.

Architecture note: Arkeep uses a pull model — agents always initiate the connection to the server, never the other way around. This means agents can run behind NAT or firewalls without exposing any port.

Typical agent lifecycle:

  1. Agent starts and calls Register to announce itself.
  2. Agent opens a persistent StreamJobs stream to receive job assignments.
  3. Agent sends periodic Heartbeat calls to signal liveness and report metrics.
  4. When a job arrives via StreamJobs, the agent executes it and calls ReportJobStatus for progress updates and StreamLogs for real-time logs.

type AgentService_StreamJobsClient

type AgentService_StreamJobsClient = grpc.ServerStreamingClient[JobAssignment]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentService_StreamJobsServer

type AgentService_StreamJobsServer = grpc.ServerStreamingServer[JobAssignment]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentService_StreamLogsClient

type AgentService_StreamLogsClient = grpc.ClientStreamingClient[LogEntry, LogStreamResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentService_StreamLogsServer

type AgentService_StreamLogsServer = grpc.ClientStreamingServer[LogEntry, LogStreamResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type DestinationStatusReport

type DestinationStatusReport struct {

	// job_id links this report to the parent job record.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// agent_id identifies the reporting agent.
	AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// destination_id is the UUID of the destination this report refers to.
	DestinationId string `protobuf:"bytes,3,opt,name=destination_id,json=destinationId,proto3" json:"destination_id,omitempty"`
	// status is either "succeeded" or "failed".
	Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
	// snapshot_id is the full restic snapshot ID created by this backup run.
	// Empty when status is "failed".
	SnapshotId string `protobuf:"bytes,5,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"`
	// size_bytes is the total bytes processed (TotalBytesProcessed from restic
	// summary). Zero when status is "failed".
	SizeBytes int64 `protobuf:"varint,6,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
	// error is the error message when status is "failed". Empty on success.
	Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`
	// started_at is when the agent began the backup to this destination.
	// Recorded immediately before invoking restic so the server can persist
	// an accurate started_at on the JobDestination row.
	StartedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
	// contains filtered or unexported fields
}

DestinationStatusReport is sent by the agent once per destination after the backup to that destination completes or fails. Carries restic summary data.

func (*DestinationStatusReport) Descriptor deprecated

func (*DestinationStatusReport) Descriptor() ([]byte, []int)

Deprecated: Use DestinationStatusReport.ProtoReflect.Descriptor instead.

func (*DestinationStatusReport) GetAgentId

func (x *DestinationStatusReport) GetAgentId() string

func (*DestinationStatusReport) GetDestinationId

func (x *DestinationStatusReport) GetDestinationId() string

func (*DestinationStatusReport) GetError

func (x *DestinationStatusReport) GetError() string

func (*DestinationStatusReport) GetJobId

func (x *DestinationStatusReport) GetJobId() string

func (*DestinationStatusReport) GetSizeBytes

func (x *DestinationStatusReport) GetSizeBytes() int64

func (*DestinationStatusReport) GetSnapshotId

func (x *DestinationStatusReport) GetSnapshotId() string

func (*DestinationStatusReport) GetStartedAt

func (x *DestinationStatusReport) GetStartedAt() *timestamppb.Timestamp

func (*DestinationStatusReport) GetStatus

func (x *DestinationStatusReport) GetStatus() string

func (*DestinationStatusReport) ProtoMessage

func (*DestinationStatusReport) ProtoMessage()

func (*DestinationStatusReport) ProtoReflect

func (x *DestinationStatusReport) ProtoReflect() protoreflect.Message

func (*DestinationStatusReport) Reset

func (x *DestinationStatusReport) Reset()

func (*DestinationStatusReport) String

func (x *DestinationStatusReport) String() string

type DestinationStatusResponse

type DestinationStatusResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

DestinationStatusResponse acknowledges receipt of the destination report.

func (*DestinationStatusResponse) Descriptor deprecated

func (*DestinationStatusResponse) Descriptor() ([]byte, []int)

Deprecated: Use DestinationStatusResponse.ProtoReflect.Descriptor instead.

func (*DestinationStatusResponse) GetOk

func (x *DestinationStatusResponse) GetOk() bool

func (*DestinationStatusResponse) ProtoMessage

func (*DestinationStatusResponse) ProtoMessage()

func (*DestinationStatusResponse) ProtoReflect

func (*DestinationStatusResponse) Reset

func (x *DestinationStatusResponse) Reset()

func (*DestinationStatusResponse) String

func (x *DestinationStatusResponse) String() string

type HeartbeatRequest

type HeartbeatRequest struct {

	// agent_id as returned by Register — used to identify the sender.
	AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// metrics is a snapshot of current resource usage on the agent host.
	Metrics *SystemMetrics `protobuf:"bytes,2,opt,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

HeartbeatRequest is sent periodically by the agent to prove liveness and report current resource utilization for the monitoring dashboard.

func (*HeartbeatRequest) Descriptor deprecated

func (*HeartbeatRequest) Descriptor() ([]byte, []int)

Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead.

func (*HeartbeatRequest) GetAgentId

func (x *HeartbeatRequest) GetAgentId() string

func (*HeartbeatRequest) GetMetrics

func (x *HeartbeatRequest) GetMetrics() *SystemMetrics

func (*HeartbeatRequest) ProtoMessage

func (*HeartbeatRequest) ProtoMessage()

func (*HeartbeatRequest) ProtoReflect

func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message

func (*HeartbeatRequest) Reset

func (x *HeartbeatRequest) Reset()

func (*HeartbeatRequest) String

func (x *HeartbeatRequest) String() string

type HeartbeatResponse

type HeartbeatResponse struct {

	// has_pending_jobs is a hint that the server has jobs queued for this agent.
	// The jobs will be delivered on the open StreamJobs stream. This field exists
	// as a fallback signal in case the stream was reconnected and missed a push.
	HasPendingJobs bool `protobuf:"varint,1,opt,name=has_pending_jobs,json=hasPendingJobs,proto3" json:"has_pending_jobs,omitempty"`
	// contains filtered or unexported fields
}

HeartbeatResponse acknowledges the heartbeat and carries control signals from the server back to the agent.

func (*HeartbeatResponse) Descriptor deprecated

func (*HeartbeatResponse) Descriptor() ([]byte, []int)

Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.

func (*HeartbeatResponse) GetHasPendingJobs

func (x *HeartbeatResponse) GetHasPendingJobs() bool

func (*HeartbeatResponse) ProtoMessage

func (*HeartbeatResponse) ProtoMessage()

func (*HeartbeatResponse) ProtoReflect

func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message

func (*HeartbeatResponse) Reset

func (x *HeartbeatResponse) Reset()

func (*HeartbeatResponse) String

func (x *HeartbeatResponse) String() string

type ImportedSnapshotInfo

type ImportedSnapshotInfo struct {

	// restic_snapshot_id is the full SHA256 snapshot ID.
	ResticSnapshotId string `protobuf:"bytes,1,opt,name=restic_snapshot_id,json=resticSnapshotId,proto3" json:"restic_snapshot_id,omitempty"`
	// snapshot_time is the creation time of the snapshot in RFC3339 format.
	SnapshotTime string `protobuf:"bytes,2,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"`
	// paths is the list of source paths included in the snapshot.
	Paths []string `protobuf:"bytes,3,rep,name=paths,proto3" json:"paths,omitempty"`
	// tags is the list of tags attached to the snapshot.
	Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	// hostname is the hostname of the machine that created the snapshot.
	Hostname string `protobuf:"bytes,5,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// contains filtered or unexported fields
}

ImportedSnapshotInfo holds the metadata of a single snapshot found in an existing Restic repository, as returned by `restic snapshots --json`.

func (*ImportedSnapshotInfo) Descriptor deprecated

func (*ImportedSnapshotInfo) Descriptor() ([]byte, []int)

Deprecated: Use ImportedSnapshotInfo.ProtoReflect.Descriptor instead.

func (*ImportedSnapshotInfo) GetHostname

func (x *ImportedSnapshotInfo) GetHostname() string

func (*ImportedSnapshotInfo) GetPaths

func (x *ImportedSnapshotInfo) GetPaths() []string

func (*ImportedSnapshotInfo) GetResticSnapshotId

func (x *ImportedSnapshotInfo) GetResticSnapshotId() string

func (*ImportedSnapshotInfo) GetSnapshotTime

func (x *ImportedSnapshotInfo) GetSnapshotTime() string

func (*ImportedSnapshotInfo) GetTags

func (x *ImportedSnapshotInfo) GetTags() []string

func (*ImportedSnapshotInfo) ProtoMessage

func (*ImportedSnapshotInfo) ProtoMessage()

func (*ImportedSnapshotInfo) ProtoReflect

func (x *ImportedSnapshotInfo) ProtoReflect() protoreflect.Message

func (*ImportedSnapshotInfo) Reset

func (x *ImportedSnapshotInfo) Reset()

func (*ImportedSnapshotInfo) String

func (x *ImportedSnapshotInfo) String() string

type JobAssignment

type JobAssignment struct {

	// job_id is a UUIDv7 generated by the server when creating the job record.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// policy_id is the UUID of the policy that triggered this job.
	// The agent uses it to fetch policy details if needed, but typically all
	// required configuration is included in the payload.
	PolicyId string `protobuf:"bytes,2,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"`
	// type determines how the agent's executor routes the job to the correct handler.
	Type JobType `protobuf:"varint,3,opt,name=type,proto3,enum=agent.JobType" json:"type,omitempty"`
	// payload is a JSON-encoded struct whose shape depends on job type.
	// See agent/internal/executor/ for the payload structs per job type.
	// Using bytes (not string) to avoid UTF-8 validation overhead on large payloads.
	Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	// scheduled_at is when the server originally scheduled this job.
	// Used for latency tracking and audit purposes.
	ScheduledAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=scheduled_at,json=scheduledAt,proto3" json:"scheduled_at,omitempty"`
	// contains filtered or unexported fields
}

JobAssignment is pushed by the server onto the StreamJobs stream when the scheduler decides a job should run on this agent.

func (*JobAssignment) Descriptor deprecated

func (*JobAssignment) Descriptor() ([]byte, []int)

Deprecated: Use JobAssignment.ProtoReflect.Descriptor instead.

func (*JobAssignment) GetJobId

func (x *JobAssignment) GetJobId() string

func (*JobAssignment) GetPayload

func (x *JobAssignment) GetPayload() []byte

func (*JobAssignment) GetPolicyId

func (x *JobAssignment) GetPolicyId() string

func (*JobAssignment) GetScheduledAt

func (x *JobAssignment) GetScheduledAt() *timestamppb.Timestamp

func (*JobAssignment) GetType

func (x *JobAssignment) GetType() JobType

func (*JobAssignment) ProtoMessage

func (*JobAssignment) ProtoMessage()

func (*JobAssignment) ProtoReflect

func (x *JobAssignment) ProtoReflect() protoreflect.Message

func (*JobAssignment) Reset

func (x *JobAssignment) Reset()

func (*JobAssignment) String

func (x *JobAssignment) String() string

type JobStatus

type JobStatus int32

JobStatus represents the lifecycle states of a job as seen by the agent.

const (
	JobStatus_JOB_STATUS_UNSPECIFIED JobStatus = 0
	// JOB_STATUS_RUNNING is reported when the agent begins execution.
	JobStatus_JOB_STATUS_RUNNING JobStatus = 1
	// JOB_STATUS_COMPLETED is reported when the job finishes without errors.
	JobStatus_JOB_STATUS_COMPLETED JobStatus = 2
	// JOB_STATUS_FAILED is reported when the job encounters a fatal error.
	JobStatus_JOB_STATUS_FAILED JobStatus = 3
	// JOB_STATUS_CANCELLED is reported when the job is aborted (e.g. agent shutdown
	// or explicit cancellation request from the server — future feature).
	JobStatus_JOB_STATUS_CANCELLED JobStatus = 4
)

func (JobStatus) Descriptor

func (JobStatus) Descriptor() protoreflect.EnumDescriptor

func (JobStatus) Enum

func (x JobStatus) Enum() *JobStatus

func (JobStatus) EnumDescriptor deprecated

func (JobStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use JobStatus.Descriptor instead.

func (JobStatus) Number

func (x JobStatus) Number() protoreflect.EnumNumber

func (JobStatus) String

func (x JobStatus) String() string

func (JobStatus) Type

type JobStatusReport

type JobStatusReport struct {

	// job_id must match the job_id from the JobAssignment that started this job.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// agent_id is included for server-side validation that the reporting agent
	// is the one the job was actually assigned to.
	AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// status is the new lifecycle state being reported.
	Status JobStatus `protobuf:"varint,3,opt,name=status,proto3,enum=agent.JobStatus" json:"status,omitempty"`
	// message is a human-readable summary of the transition.
	// Examples: "Starting backup of /var/data", "3 files added, 0 errors", "connection refused"
	Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// timestamp is when this status transition occurred on the agent.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

JobStatusReport notifies the server of a lifecycle transition for a running job. The agent sends at least two reports per job: RUNNING at start, then COMPLETED or FAILED at the end. Additional RUNNING reports can carry progress messages.

func (*JobStatusReport) Descriptor deprecated

func (*JobStatusReport) Descriptor() ([]byte, []int)

Deprecated: Use JobStatusReport.ProtoReflect.Descriptor instead.

func (*JobStatusReport) GetAgentId

func (x *JobStatusReport) GetAgentId() string

func (*JobStatusReport) GetJobId

func (x *JobStatusReport) GetJobId() string

func (*JobStatusReport) GetMessage

func (x *JobStatusReport) GetMessage() string

func (*JobStatusReport) GetStatus

func (x *JobStatusReport) GetStatus() JobStatus

func (*JobStatusReport) GetTimestamp

func (x *JobStatusReport) GetTimestamp() *timestamppb.Timestamp

func (*JobStatusReport) ProtoMessage

func (*JobStatusReport) ProtoMessage()

func (*JobStatusReport) ProtoReflect

func (x *JobStatusReport) ProtoReflect() protoreflect.Message

func (*JobStatusReport) Reset

func (x *JobStatusReport) Reset()

func (*JobStatusReport) String

func (x *JobStatusReport) String() string

type JobStatusResponse

type JobStatusResponse struct {

	// ok is true when the server successfully persisted the status update.
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

JobStatusResponse acknowledges receipt of the status report.

func (*JobStatusResponse) Descriptor deprecated

func (*JobStatusResponse) Descriptor() ([]byte, []int)

Deprecated: Use JobStatusResponse.ProtoReflect.Descriptor instead.

func (*JobStatusResponse) GetOk

func (x *JobStatusResponse) GetOk() bool

func (*JobStatusResponse) ProtoMessage

func (*JobStatusResponse) ProtoMessage()

func (*JobStatusResponse) ProtoReflect

func (x *JobStatusResponse) ProtoReflect() protoreflect.Message

func (*JobStatusResponse) Reset

func (x *JobStatusResponse) Reset()

func (*JobStatusResponse) String

func (x *JobStatusResponse) String() string

type JobType

type JobType int32

JobType identifies the kind of operation the agent must perform. The executor uses this to select the appropriate JobHandler implementation.

const (
	JobType_JOB_TYPE_UNSPECIFIED JobType = 0
	// JOB_TYPE_BACKUP runs a full backup cycle: snapshot creation + optional verify.
	JobType_JOB_TYPE_BACKUP JobType = 1
	// JOB_TYPE_VERIFY checks repository integrity via restic check.
	JobType_JOB_TYPE_VERIFY JobType = 2
	// JOB_TYPE_RESTORE extracts files from a snapshot to a target directory.
	JobType_JOB_TYPE_RESTORE JobType = 3
	// JOB_TYPE_FORGET applies the retention policy via restic forget --prune.
	JobType_JOB_TYPE_FORGET JobType = 4
	// JOB_TYPE_LIST_VOLUMES is a synthetic, non-persisted job type used to ask
	// the agent to enumerate Docker volumes on its host. The job_id field in
	// the JobAssignment carries a correlation_id generated by the REST handler
	// rather than a real DB job UUID. The agent responds via ReportVolumeList.
	JobType_JOB_TYPE_LIST_VOLUMES JobType = 5
	// JOB_TYPE_LIST_SNAPSHOT_FILES is a synthetic, non-persisted job type used to
	// browse the contents of a Restic snapshot. The job_id carries a correlation_id;
	// the agent responds via ReportSnapshotBrowse.
	JobType_JOB_TYPE_LIST_SNAPSHOT_FILES JobType = 6
	// JOB_TYPE_IMPORT_SNAPSHOTS is a synthetic, non-persisted job type used to
	// enumerate all snapshots in an existing Restic repository on a destination.
	// The agent responds via ReportSnapshotImport.
	JobType_JOB_TYPE_IMPORT_SNAPSHOTS JobType = 7
	// JOB_TYPE_CANCEL instructs the agent to abort the job identified by job_id.
	// If the job is currently executing, its context is cancelled. If it is still
	// queued but not yet started, it is marked for cancellation before execution.
	// The agent reports JOB_STATUS_CANCELLED via ReportJobStatus after aborting.
	JobType_JOB_TYPE_CANCEL JobType = 8
)

func (JobType) Descriptor

func (JobType) Descriptor() protoreflect.EnumDescriptor

func (JobType) Enum

func (x JobType) Enum() *JobType

func (JobType) EnumDescriptor deprecated

func (JobType) EnumDescriptor() ([]byte, []int)

Deprecated: Use JobType.Descriptor instead.

func (JobType) Number

func (x JobType) Number() protoreflect.EnumNumber

func (JobType) String

func (x JobType) String() string

func (JobType) Type

func (JobType) Type() protoreflect.EnumType

type LogEntry

type LogEntry struct {

	// job_id links this log entry to its parent job record.
	JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// agent_id is included so the server can validate the sender.
	AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// level indicates severity, used for filtering in the GUI log viewer.
	Level LogLevel `protobuf:"varint,3,opt,name=level,proto3,enum=agent.LogLevel" json:"level,omitempty"`
	// message is the raw log line from the executor or restic wrapper.
	// Sensitive values (passwords, credentials) must be redacted by the agent
	// before including them here. See agent/internal/restic/redact.go.
	Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// timestamp is when the log line was produced on the agent.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

LogEntry is a single log line produced by the agent during job execution. Entries are streamed in order and buffered server-side for bulk DB insert.

func (*LogEntry) Descriptor deprecated

func (*LogEntry) Descriptor() ([]byte, []int)

Deprecated: Use LogEntry.ProtoReflect.Descriptor instead.

func (*LogEntry) GetAgentId

func (x *LogEntry) GetAgentId() string

func (*LogEntry) GetJobId

func (x *LogEntry) GetJobId() string

func (*LogEntry) GetLevel

func (x *LogEntry) GetLevel() LogLevel

func (*LogEntry) GetMessage

func (x *LogEntry) GetMessage() string

func (*LogEntry) GetTimestamp

func (x *LogEntry) GetTimestamp() *timestamppb.Timestamp

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) ProtoReflect

func (x *LogEntry) ProtoReflect() protoreflect.Message

func (*LogEntry) Reset

func (x *LogEntry) Reset()

func (*LogEntry) String

func (x *LogEntry) String() string

type LogLevel

type LogLevel int32

LogLevel mirrors common logging severity levels. The agent maps its internal zap levels to these values before streaming.

const (
	LogLevel_LOG_LEVEL_UNSPECIFIED LogLevel = 0
	LogLevel_LOG_LEVEL_DEBUG       LogLevel = 1
	LogLevel_LOG_LEVEL_INFO        LogLevel = 2
	LogLevel_LOG_LEVEL_WARN        LogLevel = 3
	LogLevel_LOG_LEVEL_ERROR       LogLevel = 4
)

func (LogLevel) Descriptor

func (LogLevel) Descriptor() protoreflect.EnumDescriptor

func (LogLevel) Enum

func (x LogLevel) Enum() *LogLevel

func (LogLevel) EnumDescriptor deprecated

func (LogLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogLevel.Descriptor instead.

func (LogLevel) Number

func (x LogLevel) Number() protoreflect.EnumNumber

func (LogLevel) String

func (x LogLevel) String() string

func (LogLevel) Type

type LogStreamResponse

type LogStreamResponse struct {

	// entries_received is the total number of log entries the server accepted.
	// The agent can use this for basic consistency checking.
	EntriesReceived uint32 `protobuf:"varint,1,opt,name=entries_received,json=entriesReceived,proto3" json:"entries_received,omitempty"`
	// contains filtered or unexported fields
}

LogStreamResponse is returned by the server when the client closes the stream.

func (*LogStreamResponse) Descriptor deprecated

func (*LogStreamResponse) Descriptor() ([]byte, []int)

Deprecated: Use LogStreamResponse.ProtoReflect.Descriptor instead.

func (*LogStreamResponse) GetEntriesReceived

func (x *LogStreamResponse) GetEntriesReceived() uint32

func (*LogStreamResponse) ProtoMessage

func (*LogStreamResponse) ProtoMessage()

func (*LogStreamResponse) ProtoReflect

func (x *LogStreamResponse) ProtoReflect() protoreflect.Message

func (*LogStreamResponse) Reset

func (x *LogStreamResponse) Reset()

func (*LogStreamResponse) String

func (x *LogStreamResponse) String() string

type RegisterRequest

type RegisterRequest struct {

	// hostname as reported by the OS (os.Hostname())
	Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// agent binary version in semver format (e.g. "1.2.3")
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// operating system identifier matching GOOS values: linux, windows, darwin
	Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"`
	// CPU architecture matching GOARCH values: amd64, arm64
	Arch string `protobuf:"bytes,4,opt,name=arch,proto3" json:"arch,omitempty"`
	// capabilities advertised by this agent instance — the server uses these
	// to validate that a policy assigned to this agent is actually executable
	Capabilities *AgentCapabilities `protobuf:"bytes,5,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
	// agent_id is the persistent UUID previously returned by the server and stored
	// locally by the agent. When non-empty, the server uses it as the primary key
	// for deduplication and upsert, ensuring the same physical agent is never
	// registered twice even if its hostname changes (e.g. Docker redeploy).
	// Empty on first-ever registration; populated on all subsequent connects.
	AgentId string `protobuf:"bytes,6,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// contains filtered or unexported fields
}

RegisterRequest carries static information about the agent's host environment. This data is persisted in the agents table and displayed in the GUI.

func (*RegisterRequest) Descriptor deprecated

func (*RegisterRequest) Descriptor() ([]byte, []int)

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetAgentId

func (x *RegisterRequest) GetAgentId() string

func (*RegisterRequest) GetArch

func (x *RegisterRequest) GetArch() string

func (*RegisterRequest) GetCapabilities

func (x *RegisterRequest) GetCapabilities() *AgentCapabilities

func (*RegisterRequest) GetHostname

func (x *RegisterRequest) GetHostname() string

func (*RegisterRequest) GetOs

func (x *RegisterRequest) GetOs() string

func (*RegisterRequest) GetVersion

func (x *RegisterRequest) GetVersion() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

func (x *RegisterRequest) ProtoReflect() protoreflect.Message

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterResponse

type RegisterResponse struct {

	// agent_id is a UUIDv7 generated by the server on first registration.
	// On subsequent Register calls from the same host, the server returns
	// the existing ID rather than creating a new record.
	AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// agent_name is the human-readable display name shown in the GUI.
	// Defaults to the hostname but can be renamed by the user.
	AgentName string `protobuf:"bytes,2,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"`
	// contains filtered or unexported fields
}

RegisterResponse contains the identity the server assigns to this agent. The agent must persist agent_id locally and reuse it on reconnect.

func (*RegisterResponse) Descriptor deprecated

func (*RegisterResponse) Descriptor() ([]byte, []int)

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetAgentId

func (x *RegisterResponse) GetAgentId() string

func (*RegisterResponse) GetAgentName

func (x *RegisterResponse) GetAgentName() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

func (x *RegisterResponse) ProtoReflect() protoreflect.Message

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type SnapshotBrowseReport

type SnapshotBrowseReport struct {

	// agent_id identifies the reporting agent.
	AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// correlation_id echoes the job_id from the JobAssignment.
	CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	// entries is the flat list of all files and directories in the snapshot.
	Entries []*SnapshotFileEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries,omitempty"`
	// error is set when the listing failed. Empty string means success.
	Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

SnapshotBrowseReport is sent by the agent in response to a JOB_TYPE_LIST_SNAPSHOT_FILES assignment.

func (*SnapshotBrowseReport) Descriptor deprecated

func (*SnapshotBrowseReport) Descriptor() ([]byte, []int)

Deprecated: Use SnapshotBrowseReport.ProtoReflect.Descriptor instead.

func (*SnapshotBrowseReport) GetAgentId

func (x *SnapshotBrowseReport) GetAgentId() string

func (*SnapshotBrowseReport) GetCorrelationId

func (x *SnapshotBrowseReport) GetCorrelationId() string

func (*SnapshotBrowseReport) GetEntries

func (x *SnapshotBrowseReport) GetEntries() []*SnapshotFileEntry

func (*SnapshotBrowseReport) GetError

func (x *SnapshotBrowseReport) GetError() string

func (*SnapshotBrowseReport) ProtoMessage

func (*SnapshotBrowseReport) ProtoMessage()

func (*SnapshotBrowseReport) ProtoReflect

func (x *SnapshotBrowseReport) ProtoReflect() protoreflect.Message

func (*SnapshotBrowseReport) Reset

func (x *SnapshotBrowseReport) Reset()

func (*SnapshotBrowseReport) String

func (x *SnapshotBrowseReport) String() string

type SnapshotBrowseResponse

type SnapshotBrowseResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

SnapshotBrowseResponse acknowledges receipt of the snapshot browse report.

func (*SnapshotBrowseResponse) Descriptor deprecated

func (*SnapshotBrowseResponse) Descriptor() ([]byte, []int)

Deprecated: Use SnapshotBrowseResponse.ProtoReflect.Descriptor instead.

func (*SnapshotBrowseResponse) GetOk

func (x *SnapshotBrowseResponse) GetOk() bool

func (*SnapshotBrowseResponse) ProtoMessage

func (*SnapshotBrowseResponse) ProtoMessage()

func (*SnapshotBrowseResponse) ProtoReflect

func (x *SnapshotBrowseResponse) ProtoReflect() protoreflect.Message

func (*SnapshotBrowseResponse) Reset

func (x *SnapshotBrowseResponse) Reset()

func (*SnapshotBrowseResponse) String

func (x *SnapshotBrowseResponse) String() string

type SnapshotFileEntry

type SnapshotFileEntry struct {

	// path is the absolute path of the file or directory within the snapshot.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// type is either "file" or "dir".
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// size is the file size in bytes. Zero for directories.
	Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	// mtime is the modification time in RFC3339 format.
	Mtime string `protobuf:"bytes,4,opt,name=mtime,proto3" json:"mtime,omitempty"`
	// contains filtered or unexported fields
}

SnapshotFileEntry represents a single file or directory within a Restic snapshot, as returned by `restic ls --json`.

func (*SnapshotFileEntry) Descriptor deprecated

func (*SnapshotFileEntry) Descriptor() ([]byte, []int)

Deprecated: Use SnapshotFileEntry.ProtoReflect.Descriptor instead.

func (*SnapshotFileEntry) GetMtime

func (x *SnapshotFileEntry) GetMtime() string

func (*SnapshotFileEntry) GetPath

func (x *SnapshotFileEntry) GetPath() string

func (*SnapshotFileEntry) GetSize

func (x *SnapshotFileEntry) GetSize() int64

func (*SnapshotFileEntry) GetType

func (x *SnapshotFileEntry) GetType() string

func (*SnapshotFileEntry) ProtoMessage

func (*SnapshotFileEntry) ProtoMessage()

func (*SnapshotFileEntry) ProtoReflect

func (x *SnapshotFileEntry) ProtoReflect() protoreflect.Message

func (*SnapshotFileEntry) Reset

func (x *SnapshotFileEntry) Reset()

func (*SnapshotFileEntry) String

func (x *SnapshotFileEntry) String() string

type SnapshotImportReport

type SnapshotImportReport struct {

	// agent_id identifies the reporting agent.
	AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// correlation_id echoes the job_id from the JobAssignment.
	CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	// snapshots is the list of all snapshots found in the repository.
	Snapshots []*ImportedSnapshotInfo `protobuf:"bytes,3,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
	// error is set when the listing failed (e.g. wrong password, repo not found).
	// An empty string means success.
	Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

SnapshotImportReport is sent by the agent in response to a JOB_TYPE_IMPORT_SNAPSHOTS assignment. The correlation_id echoes the job_id so the server can match this response to the waiting REST request.

func (*SnapshotImportReport) Descriptor deprecated

func (*SnapshotImportReport) Descriptor() ([]byte, []int)

Deprecated: Use SnapshotImportReport.ProtoReflect.Descriptor instead.

func (*SnapshotImportReport) GetAgentId

func (x *SnapshotImportReport) GetAgentId() string

func (*SnapshotImportReport) GetCorrelationId

func (x *SnapshotImportReport) GetCorrelationId() string

func (*SnapshotImportReport) GetError

func (x *SnapshotImportReport) GetError() string

func (*SnapshotImportReport) GetSnapshots

func (x *SnapshotImportReport) GetSnapshots() []*ImportedSnapshotInfo

func (*SnapshotImportReport) ProtoMessage

func (*SnapshotImportReport) ProtoMessage()

func (*SnapshotImportReport) ProtoReflect

func (x *SnapshotImportReport) ProtoReflect() protoreflect.Message

func (*SnapshotImportReport) Reset

func (x *SnapshotImportReport) Reset()

func (*SnapshotImportReport) String

func (x *SnapshotImportReport) String() string

type SnapshotImportResponse

type SnapshotImportResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

SnapshotImportResponse acknowledges receipt of the snapshot import report.

func (*SnapshotImportResponse) Descriptor deprecated

func (*SnapshotImportResponse) Descriptor() ([]byte, []int)

Deprecated: Use SnapshotImportResponse.ProtoReflect.Descriptor instead.

func (*SnapshotImportResponse) GetOk

func (x *SnapshotImportResponse) GetOk() bool

func (*SnapshotImportResponse) ProtoMessage

func (*SnapshotImportResponse) ProtoMessage()

func (*SnapshotImportResponse) ProtoReflect

func (x *SnapshotImportResponse) ProtoReflect() protoreflect.Message

func (*SnapshotImportResponse) Reset

func (x *SnapshotImportResponse) Reset()

func (*SnapshotImportResponse) String

func (x *SnapshotImportResponse) String() string

type StreamJobsRequest

type StreamJobsRequest struct {

	// agent_id as returned by Register.
	AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// contains filtered or unexported fields
}

StreamJobsRequest opens the job delivery stream for a specific agent.

func (*StreamJobsRequest) Descriptor deprecated

func (*StreamJobsRequest) Descriptor() ([]byte, []int)

Deprecated: Use StreamJobsRequest.ProtoReflect.Descriptor instead.

func (*StreamJobsRequest) GetAgentId

func (x *StreamJobsRequest) GetAgentId() string

func (*StreamJobsRequest) ProtoMessage

func (*StreamJobsRequest) ProtoMessage()

func (*StreamJobsRequest) ProtoReflect

func (x *StreamJobsRequest) ProtoReflect() protoreflect.Message

func (*StreamJobsRequest) Reset

func (x *StreamJobsRequest) Reset()

func (*StreamJobsRequest) String

func (x *StreamJobsRequest) String() string

type SystemMetrics

type SystemMetrics struct {

	// cpu_percent is the current CPU utilization across all cores (0–100).
	CpuPercent float32 `protobuf:"fixed32,1,opt,name=cpu_percent,json=cpuPercent,proto3" json:"cpu_percent,omitempty"`
	// mem_percent is the percentage of physical RAM currently in use (0–100).
	MemPercent float32 `protobuf:"fixed32,2,opt,name=mem_percent,json=memPercent,proto3" json:"mem_percent,omitempty"`
	// disk_percent is the usage percentage of the primary data partition (0–100).
	// For agents running in Docker, this reflects the host partition where the
	// backup source is located, not the container overlay filesystem.
	DiskPercent float32 `protobuf:"fixed32,3,opt,name=disk_percent,json=diskPercent,proto3" json:"disk_percent,omitempty"`
	// contains filtered or unexported fields
}

SystemMetrics holds a lightweight snapshot of host resource usage. Values are percentages to avoid unit conversion issues across platforms.

func (*SystemMetrics) Descriptor deprecated

func (*SystemMetrics) Descriptor() ([]byte, []int)

Deprecated: Use SystemMetrics.ProtoReflect.Descriptor instead.

func (*SystemMetrics) GetCpuPercent

func (x *SystemMetrics) GetCpuPercent() float32

func (*SystemMetrics) GetDiskPercent

func (x *SystemMetrics) GetDiskPercent() float32

func (*SystemMetrics) GetMemPercent

func (x *SystemMetrics) GetMemPercent() float32

func (*SystemMetrics) ProtoMessage

func (*SystemMetrics) ProtoMessage()

func (*SystemMetrics) ProtoReflect

func (x *SystemMetrics) ProtoReflect() protoreflect.Message

func (*SystemMetrics) Reset

func (x *SystemMetrics) Reset()

func (*SystemMetrics) String

func (x *SystemMetrics) String() string

type UnimplementedAgentServiceServer

type UnimplementedAgentServiceServer struct{}

UnimplementedAgentServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAgentServiceServer) Heartbeat

func (UnimplementedAgentServiceServer) Register

func (UnimplementedAgentServiceServer) ReportDestinationStatus

func (UnimplementedAgentServiceServer) ReportJobStatus

func (UnimplementedAgentServiceServer) ReportSnapshotBrowse

func (UnimplementedAgentServiceServer) ReportSnapshotImport

func (UnimplementedAgentServiceServer) ReportVolumeList

func (UnimplementedAgentServiceServer) StreamJobs

func (UnimplementedAgentServiceServer) StreamLogs

type UnsafeAgentServiceServer

type UnsafeAgentServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServiceServer will result in compilation errors.

type VolumeInfo

type VolumeInfo struct {

	// name is the Docker volume name (e.g. "myapp_postgres_data").
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// mountpoint is the absolute host path where the volume data lives.
	Mountpoint string `protobuf:"bytes,2,opt,name=mountpoint,proto3" json:"mountpoint,omitempty"`
	// driver is the volume driver (e.g. "local", "rexray/s3").
	Driver string `protobuf:"bytes,3,opt,name=driver,proto3" json:"driver,omitempty"`
	// contains filtered or unexported fields
}

VolumeInfo holds the metadata of a single Docker volume on the agent host. Mirrors docker.VolumeInfo in agent/internal/docker/discovery.go.

func (*VolumeInfo) Descriptor deprecated

func (*VolumeInfo) Descriptor() ([]byte, []int)

Deprecated: Use VolumeInfo.ProtoReflect.Descriptor instead.

func (*VolumeInfo) GetDriver

func (x *VolumeInfo) GetDriver() string

func (*VolumeInfo) GetMountpoint

func (x *VolumeInfo) GetMountpoint() string

func (*VolumeInfo) GetName

func (x *VolumeInfo) GetName() string

func (*VolumeInfo) ProtoMessage

func (*VolumeInfo) ProtoMessage()

func (*VolumeInfo) ProtoReflect

func (x *VolumeInfo) ProtoReflect() protoreflect.Message

func (*VolumeInfo) Reset

func (x *VolumeInfo) Reset()

func (*VolumeInfo) String

func (x *VolumeInfo) String() string

type VolumeListReport

type VolumeListReport struct {

	// agent_id identifies the reporting agent.
	AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	// correlation_id echoes the job_id from the JOB_TYPE_LIST_VOLUMES assignment.
	CorrelationId string `protobuf:"bytes,2,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
	// volumes is the list of Docker volumes found on the agent host.
	// Empty if Docker is unavailable or no volumes exist.
	Volumes []*VolumeInfo `protobuf:"bytes,3,rep,name=volumes,proto3" json:"volumes,omitempty"`
	// error is set when the listing failed (e.g. Docker daemon unreachable).
	// An empty string means success.
	Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

VolumeListReport is sent by the agent in response to a JOB_TYPE_LIST_VOLUMES assignment. The correlation_id echoes the job_id from the JobAssignment so the server can match this response to the waiting REST request.

func (*VolumeListReport) Descriptor deprecated

func (*VolumeListReport) Descriptor() ([]byte, []int)

Deprecated: Use VolumeListReport.ProtoReflect.Descriptor instead.

func (*VolumeListReport) GetAgentId

func (x *VolumeListReport) GetAgentId() string

func (*VolumeListReport) GetCorrelationId

func (x *VolumeListReport) GetCorrelationId() string

func (*VolumeListReport) GetError

func (x *VolumeListReport) GetError() string

func (*VolumeListReport) GetVolumes

func (x *VolumeListReport) GetVolumes() []*VolumeInfo

func (*VolumeListReport) ProtoMessage

func (*VolumeListReport) ProtoMessage()

func (*VolumeListReport) ProtoReflect

func (x *VolumeListReport) ProtoReflect() protoreflect.Message

func (*VolumeListReport) Reset

func (x *VolumeListReport) Reset()

func (*VolumeListReport) String

func (x *VolumeListReport) String() string

type VolumeListResponse

type VolumeListResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

VolumeListResponse acknowledges receipt of the volume list report.

func (*VolumeListResponse) Descriptor deprecated

func (*VolumeListResponse) Descriptor() ([]byte, []int)

Deprecated: Use VolumeListResponse.ProtoReflect.Descriptor instead.

func (*VolumeListResponse) GetOk

func (x *VolumeListResponse) GetOk() bool

func (*VolumeListResponse) ProtoMessage

func (*VolumeListResponse) ProtoMessage()

func (*VolumeListResponse) ProtoReflect

func (x *VolumeListResponse) ProtoReflect() protoreflect.Message

func (*VolumeListResponse) Reset

func (x *VolumeListResponse) Reset()

func (*VolumeListResponse) String

func (x *VolumeListResponse) String() string

Jump to

Keyboard shortcuts

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