v1

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DiscoveryService_GetWorkload_FullMethodName   = "/agntcy.dir.runtime.v1.DiscoveryService/GetWorkload"
	DiscoveryService_ListWorkloads_FullMethodName = "/agntcy.dir.runtime.v1.DiscoveryService/ListWorkloads"
)

Variables

View Source
var (
	RuntimeType_name = map[int32]string{
		0: "RUNTIME_TYPE_UNSPECIFIED",
		1: "RUNTIME_TYPE_DOCKER",
		2: "RUNTIME_TYPE_KUBERNETES",
	}
	RuntimeType_value = map[string]int32{
		"RUNTIME_TYPE_UNSPECIFIED": 0,
		"RUNTIME_TYPE_DOCKER":      1,
		"RUNTIME_TYPE_KUBERNETES":  2,
	}
)

Enum value maps for RuntimeType.

View Source
var (
	WorkloadType_name = map[int32]string{
		0: "WORKLOAD_TYPE_UNSPECIFIED",
		1: "WORKLOAD_TYPE_PROCESS",
		2: "WORKLOAD_TYPE_CONTAINER",
		3: "WORKLOAD_TYPE_POD",
	}
	WorkloadType_value = map[string]int32{
		"WORKLOAD_TYPE_UNSPECIFIED": 0,
		"WORKLOAD_TYPE_PROCESS":     1,
		"WORKLOAD_TYPE_CONTAINER":   2,
		"WORKLOAD_TYPE_POD":         3,
	}
)

Enum value maps for WorkloadType.

View Source
var DiscoveryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agntcy.dir.runtime.v1.DiscoveryService",
	HandlerType: (*DiscoveryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetWorkload",
			Handler:    _DiscoveryService_GetWorkload_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListWorkloads",
			Handler:       _DiscoveryService_ListWorkloads_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "agntcy/dir/runtime/v1/discovery_service.proto",
}

DiscoveryService_ServiceDesc is the grpc.ServiceDesc for DiscoveryService 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_agntcy_dir_runtime_v1_discovery_service_proto protoreflect.FileDescriptor
View Source
var File_agntcy_dir_runtime_v1_workload_proto protoreflect.FileDescriptor

Functions

func RegisterDiscoveryServiceServer

func RegisterDiscoveryServiceServer(s grpc.ServiceRegistrar, srv DiscoveryServiceServer)

Types

type DiscoveryServiceClient

type DiscoveryServiceClient interface {
	// Get a workload by its identifier.
	GetWorkload(ctx context.Context, in *GetWorkloadRequest, opts ...grpc.CallOption) (*Workload, error)
	// List all workloads based on filters.
	ListWorkloads(ctx context.Context, in *ListWorkloadsRequest, opts ...grpc.CallOption) (DiscoveryService_ListWorkloadsClient, error)
}

DiscoveryServiceClient is the client API for DiscoveryService 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.

DiscoveryService defines the gRPC service for discovering workloads. The service itself does not actually perform discovery, but rather queries the underlying store for existing workloads. It supports filtering workloads based on provided criteria.

type DiscoveryServiceServer

type DiscoveryServiceServer interface {
	// Get a workload by its identifier.
	GetWorkload(context.Context, *GetWorkloadRequest) (*Workload, error)
	// List all workloads based on filters.
	ListWorkloads(*ListWorkloadsRequest, DiscoveryService_ListWorkloadsServer) error
}

DiscoveryServiceServer is the server API for DiscoveryService service. All implementations should embed UnimplementedDiscoveryServiceServer for forward compatibility.

DiscoveryService defines the gRPC service for discovering workloads. The service itself does not actually perform discovery, but rather queries the underlying store for existing workloads. It supports filtering workloads based on provided criteria.

type DiscoveryService_ListWorkloadsClient

type DiscoveryService_ListWorkloadsClient interface {
	Recv() (*Workload, error)
	grpc.ClientStream
}

type DiscoveryService_ListWorkloadsServer

type DiscoveryService_ListWorkloadsServer interface {
	Send(*Workload) error
	grpc.ServerStream
}

type GetWorkloadRequest

type GetWorkloadRequest struct {

	// The unique identifier of the workload to retrieve.
	// Supports either hostname or workload ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

GetWorkloadRequest is the request message for retrieving a specific workload.

func (*GetWorkloadRequest) Descriptor deprecated

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

Deprecated: Use GetWorkloadRequest.ProtoReflect.Descriptor instead.

func (*GetWorkloadRequest) GetId

func (x *GetWorkloadRequest) GetId() string

func (*GetWorkloadRequest) ProtoMessage

func (*GetWorkloadRequest) ProtoMessage()

func (*GetWorkloadRequest) ProtoReflect

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

func (*GetWorkloadRequest) Reset

func (x *GetWorkloadRequest) Reset()

func (*GetWorkloadRequest) String

func (x *GetWorkloadRequest) String() string

type ListWorkloadsRequest

type ListWorkloadsRequest struct {

	// Optional labels to filter workloads.
	// Labels are applied in an AND fashion; only workloads matching all labels are returned.
	// Supports regular expression syntax for label values.
	Labels map[string]string `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

ListWorkloadsRequest is the request message for listing workloads with optional filters.

func (*ListWorkloadsRequest) Descriptor deprecated

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

Deprecated: Use ListWorkloadsRequest.ProtoReflect.Descriptor instead.

func (*ListWorkloadsRequest) GetLabels

func (x *ListWorkloadsRequest) GetLabels() map[string]string

func (*ListWorkloadsRequest) ProtoMessage

func (*ListWorkloadsRequest) ProtoMessage()

func (*ListWorkloadsRequest) ProtoReflect

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

func (*ListWorkloadsRequest) Reset

func (x *ListWorkloadsRequest) Reset()

func (*ListWorkloadsRequest) String

func (x *ListWorkloadsRequest) String() string

type RuntimeType

type RuntimeType int32

RuntimeType represents the type of runtime.

const (
	RuntimeType_RUNTIME_TYPE_UNSPECIFIED RuntimeType = 0 // Unknown runtime type
	RuntimeType_RUNTIME_TYPE_DOCKER      RuntimeType = 1 // Docker runtime
	RuntimeType_RUNTIME_TYPE_KUBERNETES  RuntimeType = 2 // Kubernetes runtime
)

func (RuntimeType) Descriptor

func (RuntimeType) Enum

func (x RuntimeType) Enum() *RuntimeType

func (RuntimeType) EnumDescriptor deprecated

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

Deprecated: Use RuntimeType.Descriptor instead.

func (RuntimeType) GetName

func (x RuntimeType) GetName() string

GetName returns a short lowercased name of the RuntimeType enum value. For example, RUNTIME_TYPE_DOCKER becomes "docker".

func (RuntimeType) Number

func (x RuntimeType) Number() protoreflect.EnumNumber

func (RuntimeType) String

func (x RuntimeType) String() string

func (RuntimeType) Type

type UnimplementedDiscoveryServiceServer

type UnimplementedDiscoveryServiceServer struct{}

UnimplementedDiscoveryServiceServer should 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 (UnimplementedDiscoveryServiceServer) GetWorkload

func (UnimplementedDiscoveryServiceServer) ListWorkloads

type UnsafeDiscoveryServiceServer

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

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

type Workload

type Workload struct {

	// ID is the unique identifier for the workload.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name is the human-readable name of the workload.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Hostname is the hostname of the workload.
	Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// Runtime is the type of the runtime (e.g., docker, containerd).
	Runtime string `protobuf:"bytes,4,opt,name=runtime,proto3" json:"runtime,omitempty"`
	// Type is the type of workload (e.g., process, container, pod).
	Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
	// Labels are key-value pairs for filtering.
	Labels map[string]string `` /* 139-byte string literal not displayed */
	// Annotations are additional metadata.
	Annotations map[string]string `` /* 149-byte string literal not displayed */
	// Addresses are the network addresses of the workload.
	Addresses []string `protobuf:"bytes,8,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// Ports are the exposed ports.
	// Specified as strings to accommodate various formats (e.g., "80/tcp", "443").
	Ports []string `protobuf:"bytes,9,rep,name=ports,proto3" json:"ports,omitempty"`
	// IsolationGroups are the network/namespace isolation groups.
	IsolationGroups []string `protobuf:"bytes,10,rep,name=isolation_groups,json=isolationGroups,proto3" json:"isolation_groups,omitempty"`
	// Services holds service/protocol-specific metadata.
	// These values can be used by discovery resolvers
	// to enrich the discovery information about the workload.
	Services *WorkloadServices `protobuf:"bytes,11,opt,name=services,proto3" json:"services,omitempty"`
	// contains filtered or unexported fields
}

Information about a discovered workload in a runtime.

func (*Workload) DeepCopy

func (x *Workload) DeepCopy() *Workload

func (*Workload) Descriptor deprecated

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

Deprecated: Use Workload.ProtoReflect.Descriptor instead.

func (*Workload) GetAddresses

func (x *Workload) GetAddresses() []string

func (*Workload) GetAnnotations

func (x *Workload) GetAnnotations() map[string]string

func (*Workload) GetHostname

func (x *Workload) GetHostname() string

func (*Workload) GetId

func (x *Workload) GetId() string

func (*Workload) GetIsolationGroups

func (x *Workload) GetIsolationGroups() []string

func (*Workload) GetLabels

func (x *Workload) GetLabels() map[string]string

func (*Workload) GetName

func (x *Workload) GetName() string

func (*Workload) GetPorts

func (x *Workload) GetPorts() []string

func (*Workload) GetRuntime

func (x *Workload) GetRuntime() string

func (*Workload) GetServices

func (x *Workload) GetServices() *WorkloadServices

func (*Workload) GetType

func (x *Workload) GetType() string

func (*Workload) ProtoMessage

func (*Workload) ProtoMessage()

func (*Workload) ProtoReflect

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

func (*Workload) Reset

func (x *Workload) Reset()

func (*Workload) String

func (x *Workload) String() string

type WorkloadServices

type WorkloadServices struct {

	// A2A holds metadata about the A2A service running inside the workload.
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	A2A *structpb.Struct `protobuf:"bytes,1,opt,name=a2a,proto3,oneof" json:"a2a,omitempty"`
	// OASF holds metadata about the OASF record that a workload references.
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	Oasf *structpb.Struct `protobuf:"bytes,2,opt,name=oasf,proto3,oneof" json:"oasf,omitempty"`
	// contains filtered or unexported fields
}

WorkloadServices holds service-specific metadata that a given workload may have. For example, a workload may have A2A server running inside it, that can be discovered and exposed via discovery.

func (*WorkloadServices) Descriptor deprecated

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

Deprecated: Use WorkloadServices.ProtoReflect.Descriptor instead.

func (*WorkloadServices) GetA2A

func (x *WorkloadServices) GetA2A() *structpb.Struct

func (*WorkloadServices) GetOasf

func (x *WorkloadServices) GetOasf() *structpb.Struct

func (*WorkloadServices) ProtoMessage

func (*WorkloadServices) ProtoMessage()

func (*WorkloadServices) ProtoReflect

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

func (*WorkloadServices) Reset

func (x *WorkloadServices) Reset()

func (*WorkloadServices) String

func (x *WorkloadServices) String() string

type WorkloadType

type WorkloadType int32

WorkloadType represents the type of workload.

const (
	WorkloadType_WORKLOAD_TYPE_UNSPECIFIED WorkloadType = 0 // Unknown workload type
	WorkloadType_WORKLOAD_TYPE_PROCESS     WorkloadType = 1 // Process workload
	WorkloadType_WORKLOAD_TYPE_CONTAINER   WorkloadType = 2 // Container workload
	WorkloadType_WORKLOAD_TYPE_POD         WorkloadType = 3 // Pod workload
)

func (WorkloadType) Descriptor

func (WorkloadType) Enum

func (x WorkloadType) Enum() *WorkloadType

func (WorkloadType) EnumDescriptor deprecated

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

Deprecated: Use WorkloadType.Descriptor instead.

func (WorkloadType) GetName

func (x WorkloadType) GetName() string

GetName returns a short lowercased name of the WorkloadType enum value. For example, WORKLOAD_TYPE_PROCESS becomes "process".

func (WorkloadType) Number

func (WorkloadType) String

func (x WorkloadType) String() string

func (WorkloadType) Type

Jump to

Keyboard shortcuts

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