daemon

package
v2.13.3-rc.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Daemon_Version_FullMethodName          = "/telepresence.daemon.Daemon/Version"
	Daemon_Status_FullMethodName           = "/telepresence.daemon.Daemon/Status"
	Daemon_Quit_FullMethodName             = "/telepresence.daemon.Daemon/Quit"
	Daemon_Connect_FullMethodName          = "/telepresence.daemon.Daemon/Connect"
	Daemon_Disconnect_FullMethodName       = "/telepresence.daemon.Daemon/Disconnect"
	Daemon_GetNetworkConfig_FullMethodName = "/telepresence.daemon.Daemon/GetNetworkConfig"
	Daemon_SetDnsSearchPath_FullMethodName = "/telepresence.daemon.Daemon/SetDnsSearchPath"
	Daemon_SetLogLevel_FullMethodName      = "/telepresence.daemon.Daemon/SetLogLevel"
	Daemon_WaitForNetwork_FullMethodName   = "/telepresence.daemon.Daemon/WaitForNetwork"
)

Variables

View Source
var Daemon_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "telepresence.daemon.Daemon",
	HandlerType: (*DaemonServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Version",
			Handler:    _Daemon_Version_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Daemon_Status_Handler,
		},
		{
			MethodName: "Quit",
			Handler:    _Daemon_Quit_Handler,
		},
		{
			MethodName: "Connect",
			Handler:    _Daemon_Connect_Handler,
		},
		{
			MethodName: "Disconnect",
			Handler:    _Daemon_Disconnect_Handler,
		},
		{
			MethodName: "GetNetworkConfig",
			Handler:    _Daemon_GetNetworkConfig_Handler,
		},
		{
			MethodName: "SetDnsSearchPath",
			Handler:    _Daemon_SetDnsSearchPath_Handler,
		},
		{
			MethodName: "SetLogLevel",
			Handler:    _Daemon_SetLogLevel_Handler,
		},
		{
			MethodName: "WaitForNetwork",
			Handler:    _Daemon_WaitForNetwork_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "daemon/daemon.proto",
}

Daemon_ServiceDesc is the grpc.ServiceDesc for Daemon 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_daemon_daemon_proto protoreflect.FileDescriptor

Functions

func RegisterDaemonServer

func RegisterDaemonServer(s grpc.ServiceRegistrar, srv DaemonServer)

Types

type DNSConfig added in v2.3.1

type DNSConfig struct {

	// local_ip is the address of the local DNS server. Only used by Linux systems that have no
	// systemd-resolved configured. Defaults to the first line of /etc/resolv.conf
	LocalIp []byte `protobuf:"bytes,1,opt,name=local_ip,json=localIp,proto3" json:"local_ip,omitempty"`
	// remote_ip is the address of the kube-dns.kube-system, dns-default.openshift-dns, or similar service,
	RemoteIp []byte `protobuf:"bytes,2,opt,name=remote_ip,json=remoteIp,proto3" json:"remote_ip,omitempty"`
	// Suffixes to exclude
	ExcludeSuffixes []string `protobuf:"bytes,3,rep,name=exclude_suffixes,json=excludeSuffixes,proto3" json:"exclude_suffixes,omitempty"`
	// Suffixes to include. Has higher prio than the excludes
	IncludeSuffixes []string `protobuf:"bytes,4,rep,name=include_suffixes,json=includeSuffixes,proto3" json:"include_suffixes,omitempty"`
	// The maximum time wait for a cluster side host lookup.
	LookupTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=lookup_timeout,json=lookupTimeout,proto3" json:"lookup_timeout,omitempty"`
	// If set, this error indicates why DNS is not working.
	Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

DNS configuration for the local DNS resolver

func (*DNSConfig) Descriptor deprecated added in v2.3.1

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

Deprecated: Use DNSConfig.ProtoReflect.Descriptor instead.

func (*DNSConfig) GetError added in v2.13.2

func (x *DNSConfig) GetError() string

func (*DNSConfig) GetExcludeSuffixes added in v2.3.1

func (x *DNSConfig) GetExcludeSuffixes() []string

func (*DNSConfig) GetIncludeSuffixes added in v2.3.1

func (x *DNSConfig) GetIncludeSuffixes() []string

func (*DNSConfig) GetLocalIp added in v2.3.1

func (x *DNSConfig) GetLocalIp() []byte

func (*DNSConfig) GetLookupTimeout added in v2.3.1

func (x *DNSConfig) GetLookupTimeout() *durationpb.Duration

func (*DNSConfig) GetRemoteIp added in v2.3.1

func (x *DNSConfig) GetRemoteIp() []byte

func (*DNSConfig) ProtoMessage added in v2.3.1

func (*DNSConfig) ProtoMessage()

func (*DNSConfig) ProtoReflect added in v2.3.1

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

func (*DNSConfig) Reset added in v2.3.1

func (x *DNSConfig) Reset()

func (*DNSConfig) String added in v2.3.1

func (x *DNSConfig) String() string

type DaemonClient

type DaemonClient interface {
	// Version returns version information from the Daemon
	Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.VersionInfo, error)
	// Status returns the current connectivity status
	Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DaemonStatus, error)
	// Quit quits (terminates) the service.
	Quit(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Connect creates a new session that provides outbound connectivity to the cluster
	Connect(ctx context.Context, in *OutboundInfo, opts ...grpc.CallOption) (*DaemonStatus, error)
	// Disconnect disconnects the current session.
	Disconnect(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// GetNetworkConfig returns the current network configuration
	GetNetworkConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NetworkConfig, error)
	// SetDnsSearchPath sets a new search path.
	SetDnsSearchPath(ctx context.Context, in *Paths, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// SetLogLevel will temporarily set the log-level for the daemon for a duration that is determined b the request.
	SetLogLevel(ctx context.Context, in *manager.LogLevelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// WaitForNetwork waits for the network of the currently connected session to become ready.
	WaitForNetwork(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

DaemonClient is the client API for Daemon 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 NewDaemonClient

func NewDaemonClient(cc grpc.ClientConnInterface) DaemonClient

type DaemonServer

type DaemonServer interface {
	// Version returns version information from the Daemon
	Version(context.Context, *emptypb.Empty) (*common.VersionInfo, error)
	// Status returns the current connectivity status
	Status(context.Context, *emptypb.Empty) (*DaemonStatus, error)
	// Quit quits (terminates) the service.
	Quit(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Connect creates a new session that provides outbound connectivity to the cluster
	Connect(context.Context, *OutboundInfo) (*DaemonStatus, error)
	// Disconnect disconnects the current session.
	Disconnect(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// GetNetworkConfig returns the current network configuration
	GetNetworkConfig(context.Context, *emptypb.Empty) (*NetworkConfig, error)
	// SetDnsSearchPath sets a new search path.
	SetDnsSearchPath(context.Context, *Paths) (*emptypb.Empty, error)
	// SetLogLevel will temporarily set the log-level for the daemon for a duration that is determined b the request.
	SetLogLevel(context.Context, *manager.LogLevelRequest) (*emptypb.Empty, error)
	// WaitForNetwork waits for the network of the currently connected session to become ready.
	WaitForNetwork(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

DaemonServer is the server API for Daemon service. All implementations must embed UnimplementedDaemonServer for forward compatibility

type DaemonStatus

type DaemonStatus struct {
	OutboundConfig *OutboundInfo       `protobuf:"bytes,4,opt,name=outbound_config,json=outboundConfig,proto3" json:"outbound_config,omitempty"`
	Version        *common.VersionInfo `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*DaemonStatus) Descriptor deprecated

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

Deprecated: Use DaemonStatus.ProtoReflect.Descriptor instead.

func (*DaemonStatus) GetOutboundConfig added in v2.3.3

func (x *DaemonStatus) GetOutboundConfig() *OutboundInfo

func (*DaemonStatus) GetVersion added in v2.8.0

func (x *DaemonStatus) GetVersion() *common.VersionInfo

func (*DaemonStatus) ProtoMessage

func (*DaemonStatus) ProtoMessage()

func (*DaemonStatus) ProtoReflect

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

func (*DaemonStatus) Reset

func (x *DaemonStatus) Reset()

func (*DaemonStatus) String

func (x *DaemonStatus) String() string

type NetworkConfig added in v2.9.0

type NetworkConfig struct {
	Subnets      []*manager.IPNet `protobuf:"bytes,1,rep,name=subnets,proto3" json:"subnets,omitempty"`
	OutboundInfo *OutboundInfo    `protobuf:"bytes,2,opt,name=outbound_info,json=outboundInfo,proto3" json:"outbound_info,omitempty"`
	// contains filtered or unexported fields
}

func (*NetworkConfig) Descriptor deprecated added in v2.9.0

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

Deprecated: Use NetworkConfig.ProtoReflect.Descriptor instead.

func (*NetworkConfig) GetOutboundInfo added in v2.9.0

func (x *NetworkConfig) GetOutboundInfo() *OutboundInfo

func (*NetworkConfig) GetSubnets added in v2.9.0

func (x *NetworkConfig) GetSubnets() []*manager.IPNet

func (*NetworkConfig) ProtoMessage added in v2.9.0

func (*NetworkConfig) ProtoMessage()

func (*NetworkConfig) ProtoReflect added in v2.9.0

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

func (*NetworkConfig) Reset added in v2.9.0

func (x *NetworkConfig) Reset()

func (*NetworkConfig) String added in v2.9.0

func (x *NetworkConfig) String() string

type OutboundInfo added in v2.3.0

type OutboundInfo struct {

	// session makes it possible for the root daemon to identify itself as the
	// same client as the user daemon.
	Session *manager.SessionInfo `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
	// DNS configuration
	Dns *DNSConfig `protobuf:"bytes,3,opt,name=dns,proto3" json:"dns,omitempty"`
	// also_proxy are user-added subnets.
	AlsoProxySubnets []*manager.IPNet `protobuf:"bytes,5,rep,name=also_proxy_subnets,json=alsoProxySubnets,proto3" json:"also_proxy_subnets,omitempty"`
	// never_proxy_subnets are subnets that the daemon should not proxy but resolve
	// via the underlying network interface.
	NeverProxySubnets []*manager.IPNet `protobuf:"bytes,6,rep,name=never_proxy_subnets,json=neverProxySubnets,proto3" json:"never_proxy_subnets,omitempty"`
	// Users home directory
	HomeDir string `protobuf:"bytes,7,opt,name=home_dir,json=homeDir,proto3" json:"home_dir,omitempty"`
	// Traffic manager namespace
	ManagerNamespace string `protobuf:"bytes,8,opt,name=manager_namespace,json=managerNamespace,proto3" json:"manager_namespace,omitempty"`
	// Kubernetes flags
	KubeFlags map[string]string `` /* 176-byte string literal not displayed */
	// contains filtered or unexported fields
}

OutboundInfo contains all information that the root daemon needs in order to establish outbound traffic to the cluster.

func (*OutboundInfo) Descriptor deprecated added in v2.3.0

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

Deprecated: Use OutboundInfo.ProtoReflect.Descriptor instead.

func (*OutboundInfo) GetAlsoProxySubnets added in v2.3.2

func (x *OutboundInfo) GetAlsoProxySubnets() []*manager.IPNet

func (*OutboundInfo) GetDns added in v2.3.1

func (x *OutboundInfo) GetDns() *DNSConfig

func (*OutboundInfo) GetHomeDir added in v2.9.3

func (x *OutboundInfo) GetHomeDir() string

func (*OutboundInfo) GetKubeFlags added in v2.9.3

func (x *OutboundInfo) GetKubeFlags() map[string]string

func (*OutboundInfo) GetManagerNamespace added in v2.9.3

func (x *OutboundInfo) GetManagerNamespace() string

func (*OutboundInfo) GetNeverProxySubnets added in v2.4.6

func (x *OutboundInfo) GetNeverProxySubnets() []*manager.IPNet

func (*OutboundInfo) GetSession added in v2.3.0

func (x *OutboundInfo) GetSession() *manager.SessionInfo

func (*OutboundInfo) ProtoMessage added in v2.3.0

func (*OutboundInfo) ProtoMessage()

func (*OutboundInfo) ProtoReflect added in v2.3.0

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

func (*OutboundInfo) Reset added in v2.3.0

func (x *OutboundInfo) Reset()

func (*OutboundInfo) String added in v2.3.0

func (x *OutboundInfo) String() string

type Paths

type Paths struct {
	Paths      []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
	Namespaces []string `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
	// contains filtered or unexported fields
}

func (*Paths) Descriptor deprecated

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

Deprecated: Use Paths.ProtoReflect.Descriptor instead.

func (*Paths) GetNamespaces added in v2.4.3

func (x *Paths) GetNamespaces() []string

func (*Paths) GetPaths

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

func (*Paths) ProtoMessage

func (*Paths) ProtoMessage()

func (*Paths) ProtoReflect

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

func (*Paths) Reset

func (x *Paths) Reset()

func (*Paths) String

func (x *Paths) String() string

type UnimplementedDaemonServer

type UnimplementedDaemonServer struct {
}

UnimplementedDaemonServer must be embedded to have forward compatible implementations.

func (UnimplementedDaemonServer) Connect added in v2.5.0

func (UnimplementedDaemonServer) Disconnect added in v2.5.0

func (UnimplementedDaemonServer) GetNetworkConfig added in v2.9.0

func (UnimplementedDaemonServer) Quit

func (UnimplementedDaemonServer) SetDnsSearchPath

func (UnimplementedDaemonServer) SetLogLevel added in v2.4.2

func (UnimplementedDaemonServer) Status

func (UnimplementedDaemonServer) Version

func (UnimplementedDaemonServer) WaitForNetwork added in v2.8.0

type UnsafeDaemonServer

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

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

Jump to

Keyboard shortcuts

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