agent

package
v2.21.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Agent_Tunnel_FullMethodName    = "/telepresence.agent.Agent/Tunnel"
	Agent_Version_FullMethodName   = "/telepresence.agent.Agent/Version"
	Agent_WatchDial_FullMethodName = "/telepresence.agent.Agent/WatchDial"
)

Variables

View Source
var Agent_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "telepresence.agent.Agent",
	HandlerType: (*AgentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Version",
			Handler:    _Agent_Version_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Tunnel",
			Handler:       _Agent_Tunnel_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "WatchDial",
			Handler:       _Agent_WatchDial_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "agent/agent.proto",
}

Agent_ServiceDesc is the grpc.ServiceDesc for Agent 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_agent_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServer

func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer)

Types

type AgentClient

type AgentClient interface {
	Tunnel(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[manager.TunnelMessage, manager.TunnelMessage], error)
	// Version returns the version information of the Manager.
	Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*manager.VersionInfo2, error)
	// WatchDial makes it possible for the client side to receive DialRequests
	// from the traffic-agent. Requests are sent when an intercepted agent needs
	// a Tunnel to the Telepresence client on the workstation. The receiver of
	// the request dials a connection and responds with the needed Tunnel.
	WatchDial(ctx context.Context, in *manager.SessionInfo, opts ...grpc.CallOption) (grpc.ServerStreamingClient[manager.DialRequest], error)
}

AgentClient is the client API for Agent 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 NewAgentClient

func NewAgentClient(cc grpc.ClientConnInterface) AgentClient

type AgentServer

type AgentServer interface {
	Tunnel(grpc.BidiStreamingServer[manager.TunnelMessage, manager.TunnelMessage]) error
	// Version returns the version information of the Manager.
	Version(context.Context, *emptypb.Empty) (*manager.VersionInfo2, error)
	// WatchDial makes it possible for the client side to receive DialRequests
	// from the traffic-agent. Requests are sent when an intercepted agent needs
	// a Tunnel to the Telepresence client on the workstation. The receiver of
	// the request dials a connection and responds with the needed Tunnel.
	WatchDial(*manager.SessionInfo, grpc.ServerStreamingServer[manager.DialRequest]) error
	// contains filtered or unexported methods
}

AgentServer is the server API for Agent service. All implementations must embed UnimplementedAgentServer for forward compatibility.

type Agent_TunnelClient

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

type Agent_TunnelServer

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

type Agent_WatchDialClient

type Agent_WatchDialClient = grpc.ServerStreamingClient[manager.DialRequest]

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

type Agent_WatchDialServer

type Agent_WatchDialServer = grpc.ServerStreamingServer[manager.DialRequest]

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

type UnimplementedAgentServer

type UnimplementedAgentServer struct{}

UnimplementedAgentServer 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 (UnimplementedAgentServer) Version

type UnsafeAgentServer

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

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

Jump to

Keyboard shortcuts

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