common

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

View Source
const (
	Tracing_DumpTraces_FullMethodName = "/telepresence.common.Tracing/DumpTraces"
)

Variables

View Source
var (
	InterceptError_name = map[int32]string{
		0:  "UNSPECIFIED",
		1:  "INTERNAL",
		2:  "NO_CONNECTION",
		3:  "NO_TRAFFIC_MANAGER",
		4:  "TRAFFIC_MANAGER_CONNECTING",
		5:  "TRAFFIC_MANAGER_ERROR",
		6:  "ALREADY_EXISTS",
		17: "NAMESPACE_AMBIGUITY",
		7:  "LOCAL_TARGET_IN_USE",
		8:  "NO_ACCEPTABLE_WORKLOAD",
		9:  "AMBIGUOUS_MATCH",
		10: "FAILED_TO_ESTABLISH",
		11: "UNSUPPORTED_WORKLOAD",
		14: "MISCONFIGURED_WORKLOAD",
		12: "NOT_FOUND",
		13: "MOUNT_POINT_BUSY",
		15: "UNKNOWN_FLAG",
		16: "EXEC_CMD",
	}
	InterceptError_value = map[string]int32{
		"UNSPECIFIED":                0,
		"INTERNAL":                   1,
		"NO_CONNECTION":              2,
		"NO_TRAFFIC_MANAGER":         3,
		"TRAFFIC_MANAGER_CONNECTING": 4,
		"TRAFFIC_MANAGER_ERROR":      5,
		"ALREADY_EXISTS":             6,
		"NAMESPACE_AMBIGUITY":        17,
		"LOCAL_TARGET_IN_USE":        7,
		"NO_ACCEPTABLE_WORKLOAD":     8,
		"AMBIGUOUS_MATCH":            9,
		"FAILED_TO_ESTABLISH":        10,
		"UNSUPPORTED_WORKLOAD":       11,
		"MISCONFIGURED_WORKLOAD":     14,
		"NOT_FOUND":                  12,
		"MOUNT_POINT_BUSY":           13,
		"UNKNOWN_FLAG":               15,
		"EXEC_CMD":                   16,
	}
)

Enum value maps for InterceptError.

View Source
var (
	Result_ErrorCategory_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "USER",
		2: "CONFIG",
		3: "NO_DAEMON_LOGS",
		4: "UNKNOWN",
	}
	Result_ErrorCategory_value = map[string]int32{
		"UNSPECIFIED":    0,
		"USER":           1,
		"CONFIG":         2,
		"NO_DAEMON_LOGS": 3,
		"UNKNOWN":        4,
	}
)

Enum value maps for Result_ErrorCategory.

View Source
var File_common_errors_proto protoreflect.FileDescriptor
View Source
var File_common_tracing_proto protoreflect.FileDescriptor
View Source
var File_common_version_proto protoreflect.FileDescriptor
View Source
var Tracing_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "telepresence.common.Tracing",
	HandlerType: (*TracingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DumpTraces",
			Handler:    _Tracing_DumpTraces_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "common/tracing.proto",
}

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

Functions

func RegisterTracingServer added in v2.7.0

func RegisterTracingServer(s grpc.ServiceRegistrar, srv TracingServer)

Types

type InterceptError added in v2.7.0

type InterceptError int32

InterceptError is a common error type used by the intercept call family (add, remove, list, available).

const (
	InterceptError_UNSPECIFIED                InterceptError = 0 // no error
	InterceptError_INTERNAL                   InterceptError = 1
	InterceptError_NO_CONNECTION              InterceptError = 2 // Have not made the .Connect RPC call (or it errored)
	InterceptError_NO_TRAFFIC_MANAGER         InterceptError = 3
	InterceptError_TRAFFIC_MANAGER_CONNECTING InterceptError = 4
	InterceptError_TRAFFIC_MANAGER_ERROR      InterceptError = 5
	InterceptError_ALREADY_EXISTS             InterceptError = 6
	InterceptError_NAMESPACE_AMBIGUITY        InterceptError = 17
	InterceptError_LOCAL_TARGET_IN_USE        InterceptError = 7
	InterceptError_NO_ACCEPTABLE_WORKLOAD     InterceptError = 8
	InterceptError_AMBIGUOUS_MATCH            InterceptError = 9
	InterceptError_FAILED_TO_ESTABLISH        InterceptError = 10
	InterceptError_UNSUPPORTED_WORKLOAD       InterceptError = 11
	InterceptError_MISCONFIGURED_WORKLOAD     InterceptError = 14
	InterceptError_NOT_FOUND                  InterceptError = 12
	InterceptError_MOUNT_POINT_BUSY           InterceptError = 13
	InterceptError_UNKNOWN_FLAG               InterceptError = 15
	InterceptError_EXEC_CMD                   InterceptError = 16 // External exec command failed
)

func (InterceptError) Descriptor added in v2.7.0

func (InterceptError) Enum added in v2.7.0

func (x InterceptError) Enum() *InterceptError

func (InterceptError) EnumDescriptor deprecated added in v2.7.0

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

Deprecated: Use InterceptError.Descriptor instead.

func (InterceptError) Number added in v2.7.0

func (InterceptError) String added in v2.7.0

func (x InterceptError) String() string

func (InterceptError) Type added in v2.7.0

type Result added in v2.10.0

type Result struct {
	Data          []byte               `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	ErrorCategory Result_ErrorCategory `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated added in v2.10.0

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetData added in v2.10.0

func (x *Result) GetData() []byte

func (*Result) GetErrorCategory added in v2.10.0

func (x *Result) GetErrorCategory() Result_ErrorCategory

func (*Result) ProtoMessage added in v2.10.0

func (*Result) ProtoMessage()

func (*Result) ProtoReflect added in v2.10.0

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

func (*Result) Reset added in v2.10.0

func (x *Result) Reset()

func (*Result) String added in v2.10.0

func (x *Result) String() string

type Result_ErrorCategory added in v2.10.0

type Result_ErrorCategory int32
const (
	Result_UNSPECIFIED    Result_ErrorCategory = 0 // No error
	Result_USER           Result_ErrorCategory = 1
	Result_CONFIG         Result_ErrorCategory = 2
	Result_NO_DAEMON_LOGS Result_ErrorCategory = 3
	Result_UNKNOWN        Result_ErrorCategory = 4
)

func (Result_ErrorCategory) Descriptor added in v2.10.0

func (Result_ErrorCategory) Enum added in v2.10.0

func (Result_ErrorCategory) EnumDescriptor deprecated added in v2.10.0

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

Deprecated: Use Result_ErrorCategory.Descriptor instead.

func (Result_ErrorCategory) Number added in v2.10.0

func (Result_ErrorCategory) String added in v2.10.0

func (x Result_ErrorCategory) String() string

func (Result_ErrorCategory) Type added in v2.10.0

type Trace added in v2.7.0

type Trace struct {
	TraceData []byte `protobuf:"bytes,1,opt,name=trace_data,json=traceData,proto3" json:"trace_data,omitempty"`
	// contains filtered or unexported fields
}

func (*Trace) Descriptor deprecated added in v2.7.0

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

Deprecated: Use Trace.ProtoReflect.Descriptor instead.

func (*Trace) GetTraceData added in v2.7.0

func (x *Trace) GetTraceData() []byte

func (*Trace) ProtoMessage added in v2.7.0

func (*Trace) ProtoMessage()

func (*Trace) ProtoReflect added in v2.7.0

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

func (*Trace) Reset added in v2.7.0

func (x *Trace) Reset()

func (*Trace) String added in v2.7.0

func (x *Trace) String() string

type TracingClient added in v2.7.0

type TracingClient interface {
	DumpTraces(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Trace, error)
}

TracingClient is the client API for Tracing 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.

func NewTracingClient added in v2.7.0

func NewTracingClient(cc grpc.ClientConnInterface) TracingClient

type TracingServer added in v2.7.0

type TracingServer interface {
	DumpTraces(context.Context, *emptypb.Empty) (*Trace, error)
	// contains filtered or unexported methods
}

TracingServer is the server API for Tracing service. All implementations must embed UnimplementedTracingServer for forward compatibility

type UnimplementedTracingServer added in v2.7.0

type UnimplementedTracingServer struct {
}

UnimplementedTracingServer must be embedded to have forward compatible implementations.

func (UnimplementedTracingServer) DumpTraces added in v2.7.0

type UnsafeTracingServer added in v2.7.0

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

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

type VersionInfo

type VersionInfo struct {

	// ApiVersion is probably unescessary, as it only gets bumped for
	// things that are detectable other ways, but it's here anyway.
	//
	//   - api_version=1 was edgectl's original JSON-based API that was
	//     served on `/var/run/edgectl.socket`.
	//
	//   - api_version=2 was edgectl's gRPC-based (`package edgectl`) API
	//     that was served on `/var/run/edgectl-daemon.socket`.
	//
	//   - api_version=3 is the current Telepresence 2 gRPC-based
	//     (`package telepresence.{sub}`) API:
	//
	//   - `telepresence.connector` is served on `/tmp/telepresence-connector.socket`.
	//
	//   - `telepresence.daemon` is served on `/var/run/telepresence-daemon.socket`.
	//
	//   - `telepresence.manager` is served on TCP `:8081` (by default) on the traffic-manager Pod.
	//
	//   - `telepresence.systema` is served on TCP+TLS `app.getambassador.io:443` (by default).
	//
	//     This is largely just a rename and split of api_version=2,
	//     since the product is called "telepresence" now instead of
	//     "edgectl" and the "connector" and the "daemon" are now two
	//     separate things.
	ApiVersion int32 `protobuf:"varint,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`
	// Version is a "vSEMVER" string of the product version number.
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// Executable is the path to the executable for the process.
	Executable string `protobuf:"bytes,3,opt,name=executable,proto3" json:"executable,omitempty"`
	// Name of the process (Client, User Daemon, Root Daemon, Traffic Manager)
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

VersionInfo is the type that both `telepresence daemon` (the super-user daemon) and `telepresence conector` (the normal-user daemon) use when reporting their version to the user-facing CLI.

func (*VersionInfo) Descriptor deprecated

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

Deprecated: Use VersionInfo.ProtoReflect.Descriptor instead.

func (*VersionInfo) GetApiVersion

func (x *VersionInfo) GetApiVersion() int32

func (*VersionInfo) GetExecutable added in v2.5.0

func (x *VersionInfo) GetExecutable() string

func (*VersionInfo) GetName added in v2.10.0

func (x *VersionInfo) GetName() string

func (*VersionInfo) GetVersion

func (x *VersionInfo) GetVersion() string

func (*VersionInfo) ProtoMessage

func (*VersionInfo) ProtoMessage()

func (*VersionInfo) ProtoReflect

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

func (*VersionInfo) Reset

func (x *VersionInfo) Reset()

func (*VersionInfo) String

func (x *VersionInfo) String() string

Jump to

Keyboard shortcuts

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