power

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package healthcheck defines the RPC interface for the sansshell HealthCheck actions.

Index

Constants

View Source
const (
	Power_Reboot_FullMethodName = "/Power.Power/Reboot"
)

Variables

View Source
var File_power_proto protoreflect.FileDescriptor
View Source
var Power_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Power.Power",
	HandlerType: (*PowerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Reboot",
			Handler:    _Power_Reboot_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "power.proto",
}

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

Functions

func RegisterPowerServer

func RegisterPowerServer(s grpc.ServiceRegistrar, srv PowerServer)

Types

type PowerClient

type PowerClient interface {
	Reboot(ctx context.Context, in *RebootRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

PowerClient is the client API for Power 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 NewPowerClient

func NewPowerClient(cc grpc.ClientConnInterface) PowerClient

type PowerClientProxy

type PowerClientProxy interface {
	PowerClient
	RebootOneMany(ctx context.Context, in *RebootRequest, opts ...grpc.CallOption) (<-chan *RebootManyResponse, error)
}

PowerClientProxy is the superset of PowerClient which additionally includes the OneMany proxy methods

func NewPowerClientProxy

func NewPowerClientProxy(cc *proxy.Conn) PowerClientProxy

NewPowerClientProxy creates a PowerClientProxy for use in proxied connections. NOTE: This takes a proxy.Conn instead of a generic ClientConnInterface as the methods here are only valid in proxy.Conn contexts.

type PowerServer

type PowerServer interface {
	Reboot(context.Context, *RebootRequest) (*emptypb.Empty, error)
}

PowerServer is the server API for Power service. All implementations should embed UnimplementedPowerServer for forward compatibility

type RebootManyResponse

type RebootManyResponse struct {
	Target string
	// As targets can be duplicated this is the index into the slice passed to proxy.Conn.
	Index int
	Resp  *emptypb.Empty
	Error error
}

RebootManyResponse encapsulates a proxy data packet. It includes the target, index, response and possible error returned.

type RebootRequest

type RebootRequest struct {

	// For specific values see https://linux.die.net/man/8/shutdown
	When    string `protobuf:"bytes,1,opt,name=when,proto3" json:"when,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

RebootRequest descirbes reboot conditions

func (*RebootRequest) Descriptor deprecated

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

Deprecated: Use RebootRequest.ProtoReflect.Descriptor instead.

func (*RebootRequest) GetMessage

func (x *RebootRequest) GetMessage() string

func (*RebootRequest) GetWhen

func (x *RebootRequest) GetWhen() string

func (*RebootRequest) ProtoMessage

func (*RebootRequest) ProtoMessage()

func (*RebootRequest) ProtoReflect

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

func (*RebootRequest) Reset

func (x *RebootRequest) Reset()

func (*RebootRequest) String

func (x *RebootRequest) String() string

type UnimplementedPowerServer

type UnimplementedPowerServer struct {
}

UnimplementedPowerServer should be embedded to have forward compatible implementations.

func (UnimplementedPowerServer) Reboot

type UnsafePowerServer

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

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

Directories

Path Synopsis
Package client provides the client interface for 'power'
Package client provides the client interface for 'power'
Package server implements the sansshell 'Power' service.
Package server implements the sansshell 'Power' service.

Jump to

Keyboard shortcuts

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