api

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_guestservice_proto protoreflect.FileDescriptor
View Source
var GuestService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "GuestService",
	HandlerType: (*GuestServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _GuestService_GetInfo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetEvents",
			Handler:       _GuestService_GetEvents_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "PostInotify",
			Handler:       _GuestService_PostInotify_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Tunnel",
			Handler:       _GuestService_Tunnel_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "guestservice.proto",
}

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

Functions

func RegisterGuestServiceServer added in v0.21.0

func RegisterGuestServiceServer(s grpc.ServiceRegistrar, srv GuestServiceServer)

Types

type Event

type Event struct {
	Time              *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	LocalPortsAdded   []*IPPort              `protobuf:"bytes,2,rep,name=local_ports_added,json=localPortsAdded,proto3" json:"local_ports_added,omitempty"`
	LocalPortsRemoved []*IPPort              `protobuf:"bytes,3,rep,name=local_ports_removed,json=localPortsRemoved,proto3" json:"local_ports_removed,omitempty"`
	Errors            []string               `protobuf:"bytes,4,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated added in v0.21.0

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetErrors added in v0.21.0

func (x *Event) GetErrors() []string

func (*Event) GetLocalPortsAdded added in v0.21.0

func (x *Event) GetLocalPortsAdded() []*IPPort

func (*Event) GetLocalPortsRemoved added in v0.21.0

func (x *Event) GetLocalPortsRemoved() []*IPPort

func (*Event) GetTime added in v0.21.0

func (x *Event) GetTime() *timestamppb.Timestamp

func (*Event) ProtoMessage added in v0.21.0

func (*Event) ProtoMessage()

func (*Event) ProtoReflect added in v0.21.0

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

func (*Event) Reset added in v0.21.0

func (x *Event) Reset()

func (*Event) String added in v0.21.0

func (x *Event) String() string

type GuestServiceClient added in v0.21.0

type GuestServiceClient interface {
	GetInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Info, error)
	GetEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (GuestService_GetEventsClient, error)
	PostInotify(ctx context.Context, opts ...grpc.CallOption) (GuestService_PostInotifyClient, error)
	Tunnel(ctx context.Context, opts ...grpc.CallOption) (GuestService_TunnelClient, error)
}

GuestServiceClient is the client API for GuestService 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 NewGuestServiceClient added in v0.21.0

func NewGuestServiceClient(cc grpc.ClientConnInterface) GuestServiceClient

type GuestServiceServer added in v0.21.0

type GuestServiceServer interface {
	GetInfo(context.Context, *emptypb.Empty) (*Info, error)
	GetEvents(*emptypb.Empty, GuestService_GetEventsServer) error
	PostInotify(GuestService_PostInotifyServer) error
	Tunnel(GuestService_TunnelServer) error
	// contains filtered or unexported methods
}

GuestServiceServer is the server API for GuestService service. All implementations must embed UnimplementedGuestServiceServer for forward compatibility

type GuestService_GetEventsClient added in v0.21.0

type GuestService_GetEventsClient interface {
	Recv() (*Event, error)
	grpc.ClientStream
}

type GuestService_GetEventsServer added in v0.21.0

type GuestService_GetEventsServer interface {
	Send(*Event) error
	grpc.ServerStream
}

type GuestService_PostInotifyClient added in v0.21.0

type GuestService_PostInotifyClient interface {
	Send(*Inotify) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type GuestService_PostInotifyServer added in v0.21.0

type GuestService_PostInotifyServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*Inotify, error)
	grpc.ServerStream
}

type GuestService_TunnelClient added in v1.0.0

type GuestService_TunnelClient interface {
	Send(*TunnelMessage) error
	Recv() (*TunnelMessage, error)
	grpc.ClientStream
}

type GuestService_TunnelServer added in v1.0.0

type GuestService_TunnelServer interface {
	Send(*TunnelMessage) error
	Recv() (*TunnelMessage, error)
	grpc.ServerStream
}

type IPPort

type IPPort struct {
	Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` //tcp, udp
	Ip       string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	Port     int32  `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*IPPort) Descriptor deprecated added in v0.21.0

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

Deprecated: Use IPPort.ProtoReflect.Descriptor instead.

func (*IPPort) GetIp added in v0.21.0

func (x *IPPort) GetIp() string

func (*IPPort) GetPort added in v0.21.0

func (x *IPPort) GetPort() int32

func (*IPPort) GetProtocol added in v1.0.0

func (x *IPPort) GetProtocol() string

func (*IPPort) HostString added in v0.21.0

func (x *IPPort) HostString() string

func (*IPPort) ProtoMessage added in v0.21.0

func (*IPPort) ProtoMessage()

func (*IPPort) ProtoReflect added in v0.21.0

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

func (*IPPort) Reset added in v0.21.0

func (x *IPPort) Reset()

func (*IPPort) String

func (x *IPPort) String() string

type Info

type Info struct {
	LocalPorts []*IPPort `protobuf:"bytes,1,rep,name=local_ports,json=localPorts,proto3" json:"local_ports,omitempty"`
	// contains filtered or unexported fields
}

func (*Info) Descriptor deprecated added in v0.21.0

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

Deprecated: Use Info.ProtoReflect.Descriptor instead.

func (*Info) GetLocalPorts added in v0.21.0

func (x *Info) GetLocalPorts() []*IPPort

func (*Info) ProtoMessage added in v0.21.0

func (*Info) ProtoMessage()

func (*Info) ProtoReflect added in v0.21.0

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

func (*Info) Reset added in v0.21.0

func (x *Info) Reset()

func (*Info) String added in v0.21.0

func (x *Info) String() string

type Inotify added in v0.21.0

type Inotify struct {
	MountPath string                 `protobuf:"bytes,1,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`
	Time      *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*Inotify) Descriptor deprecated added in v0.21.0

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

Deprecated: Use Inotify.ProtoReflect.Descriptor instead.

func (*Inotify) GetMountPath added in v0.21.0

func (x *Inotify) GetMountPath() string

func (*Inotify) GetTime added in v0.21.0

func (x *Inotify) GetTime() *timestamppb.Timestamp

func (*Inotify) ProtoMessage added in v0.21.0

func (*Inotify) ProtoMessage()

func (*Inotify) ProtoReflect added in v0.21.0

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

func (*Inotify) Reset added in v0.21.0

func (x *Inotify) Reset()

func (*Inotify) String added in v0.21.0

func (x *Inotify) String() string

type TunnelMessage added in v1.0.0

type TunnelMessage struct {
	Id            string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Protocol      string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` //tcp, udp
	Data          []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	GuestAddr     string `protobuf:"bytes,4,opt,name=guestAddr,proto3" json:"guestAddr,omitempty"`
	UdpTargetAddr string `protobuf:"bytes,5,opt,name=udpTargetAddr,proto3" json:"udpTargetAddr,omitempty"`
	// contains filtered or unexported fields
}

func (*TunnelMessage) Descriptor deprecated added in v1.0.0

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

Deprecated: Use TunnelMessage.ProtoReflect.Descriptor instead.

func (*TunnelMessage) GetData added in v1.0.0

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

func (*TunnelMessage) GetGuestAddr added in v1.0.0

func (x *TunnelMessage) GetGuestAddr() string

func (*TunnelMessage) GetId added in v1.0.0

func (x *TunnelMessage) GetId() string

func (*TunnelMessage) GetProtocol added in v1.0.0

func (x *TunnelMessage) GetProtocol() string

func (*TunnelMessage) GetUdpTargetAddr added in v1.0.0

func (x *TunnelMessage) GetUdpTargetAddr() string

func (*TunnelMessage) ProtoMessage added in v1.0.0

func (*TunnelMessage) ProtoMessage()

func (*TunnelMessage) ProtoReflect added in v1.0.0

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

func (*TunnelMessage) Reset added in v1.0.0

func (x *TunnelMessage) Reset()

func (*TunnelMessage) String added in v1.0.0

func (x *TunnelMessage) String() string

type UnimplementedGuestServiceServer added in v0.21.0

type UnimplementedGuestServiceServer struct {
}

UnimplementedGuestServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGuestServiceServer) GetEvents added in v0.21.0

func (UnimplementedGuestServiceServer) GetInfo added in v0.21.0

func (UnimplementedGuestServiceServer) PostInotify added in v0.21.0

func (UnimplementedGuestServiceServer) Tunnel added in v1.0.0

type UnsafeGuestServiceServer added in v0.21.0

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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