Documentation
¶
Index ¶
- Variables
- func HTTP2Transport(address string) (*grpc.ClientConn, error)
- func NewTransport(address string, opts ...TransportOption) (*grpc.ClientConn, error)
- func QUICTransport(address string) (*grpc.ClientConn, error)
- func RegisterPortalServer(s grpc.ServiceRegistrar, srv PortalServer)
- type Command
- type PortalClient
- type PortalServer
- type Response
- type Service
- type Transport
- type TransportOption
- type UnimplementedPortalServer
- func (UnimplementedPortalServer) RunCommand(context.Context, *Command) (*Response, error)
- func (UnimplementedPortalServer) ServiceRestart(context.Context, *Service) (*Response, error)
- func (UnimplementedPortalServer) ServiceStart(context.Context, *Service) (*Response, error)
- func (UnimplementedPortalServer) ServiceStatus(context.Context, *Service) (*Response, error)
- func (UnimplementedPortalServer) ServiceStop(context.Context, *Service) (*Response, error)
- type UnsafePortalServer
Constants ¶
This section is empty.
Variables ¶
var File_portal_proto protoreflect.FileDescriptor
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) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
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) GetContent ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
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.