portal

package module
v0.0.0-...-052c5cb Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_portal_proto protoreflect.FileDescriptor
View Source
var Portal_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "portal.Portal",
	HandlerType: (*PortalServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ServiceRestart",
			Handler:    _Portal_ServiceRestart_Handler,
		},
		{
			MethodName: "ServiceStart",
			Handler:    _Portal_ServiceStart_Handler,
		},
		{
			MethodName: "ServiceStop",
			Handler:    _Portal_ServiceStop_Handler,
		},
		{
			MethodName: "ServiceStatus",
			Handler:    _Portal_ServiceStatus_Handler,
		},
		{
			MethodName: "RunCommand",
			Handler:    _Portal_RunCommand_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "portal.proto",
}

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

Functions

func HTTP2Transport

func HTTP2Transport(address string) (*grpc.ClientConn, error)

func NewTransport

func NewTransport(address string, opts ...TransportOption) (*grpc.ClientConn, error)

func QUICTransport

func QUICTransport(address string) (*grpc.ClientConn, error)

func RegisterPortalServer

func RegisterPortalServer(s grpc.ServiceRegistrar, srv PortalServer)

Types

type Command

type Command struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Command) Descriptor deprecated

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

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetName

func (x *Command) GetName() string

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

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

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type PortalClient

type PortalClient interface {
	ServiceRestart(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Response, error)
	ServiceStart(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Response, error)
	ServiceStop(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Response, error)
	ServiceStatus(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Response, error)
	RunCommand(ctx context.Context, in *Command, opts ...grpc.CallOption) (*Response, error)
}

PortalClient is the client API for Portal 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 NewPortalClient

func NewPortalClient(cc grpc.ClientConnInterface) PortalClient

type PortalServer

type PortalServer interface {
	ServiceRestart(context.Context, *Service) (*Response, error)
	ServiceStart(context.Context, *Service) (*Response, error)
	ServiceStop(context.Context, *Service) (*Response, error)
	ServiceStatus(context.Context, *Service) (*Response, error)
	RunCommand(context.Context, *Command) (*Response, error)
	// contains filtered or unexported methods
}

PortalServer is the server API for Portal service. All implementations must embed UnimplementedPortalServer for forward compatibility

type Response

type Response struct {
	Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetContent

func (x *Response) GetContent() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Service

type Service struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated

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

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

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

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type Transport

type Transport struct {
	Conn    *grpc.ClientConn
	Address string
	// contains filtered or unexported fields
}

type TransportOption

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

func WithInsecure

func WithInsecure(enable bool) TransportOption

func WithSSH

func WithSSH(key key.Key) TransportOption

type UnimplementedPortalServer

type UnimplementedPortalServer struct {
}

UnimplementedPortalServer must be embedded to have forward compatible implementations.

func (UnimplementedPortalServer) RunCommand

func (UnimplementedPortalServer) ServiceRestart

func (UnimplementedPortalServer) ServiceStart

func (UnimplementedPortalServer) ServiceStatus

func (UnimplementedPortalServer) ServiceStop

type UnsafePortalServer

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

UnsafePortalServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PortalServer 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