portal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	State_name = map[int32]string{
		0: "UNKNOWN",
		1: "CHANGED",
		2: "UNCHANGED",
	}
	State_value = map[string]int32{
		"UNKNOWN":   0,
		"CHANGED":   1,
		"UNCHANGED": 2,
	}
)

Enum value maps for State.

View Source
var File_portal_portal_proto protoreflect.FileDescriptor

Functions

func DRPCRegisterPortal

func DRPCRegisterPortal(mux drpc.Mux, impl DRPCPortalServer) error

Types

type CPUusageRequest

type CPUusageRequest struct {
	// contains filtered or unexported fields
}

func (*CPUusageRequest) Descriptor deprecated

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

Deprecated: Use CPUusageRequest.ProtoReflect.Descriptor instead.

func (*CPUusageRequest) ProtoMessage

func (*CPUusageRequest) ProtoMessage()

func (*CPUusageRequest) ProtoReflect

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

func (*CPUusageRequest) Reset

func (x *CPUusageRequest) Reset()

func (*CPUusageRequest) String

func (x *CPUusageRequest) String() string

type CPUusageResponse

type CPUusageResponse struct {
	Loadavg1  int32 `protobuf:"varint,1,opt,name=loadavg1,proto3" json:"loadavg1,omitempty"`
	Loadavg5  int32 `protobuf:"varint,2,opt,name=loadavg5,proto3" json:"loadavg5,omitempty"`
	Loadavg15 int32 `protobuf:"varint,3,opt,name=loadavg15,proto3" json:"loadavg15,omitempty"`
	// contains filtered or unexported fields
}

func (*CPUusageResponse) Descriptor deprecated

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

Deprecated: Use CPUusageResponse.ProtoReflect.Descriptor instead.

func (*CPUusageResponse) GetLoadavg1

func (x *CPUusageResponse) GetLoadavg1() int32

func (*CPUusageResponse) GetLoadavg15

func (x *CPUusageResponse) GetLoadavg15() int32

func (*CPUusageResponse) GetLoadavg5

func (x *CPUusageResponse) GetLoadavg5() int32

func (*CPUusageResponse) ProtoMessage

func (*CPUusageResponse) ProtoMessage()

func (*CPUusageResponse) ProtoReflect

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

func (*CPUusageResponse) Reset

func (x *CPUusageResponse) Reset()

func (*CPUusageResponse) String

func (x *CPUusageResponse) String() string

type CommandRequest

type CommandRequest struct {
	Name string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandRequest) Descriptor deprecated

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

Deprecated: Use CommandRequest.ProtoReflect.Descriptor instead.

func (*CommandRequest) GetArgs

func (x *CommandRequest) GetArgs() []string

func (*CommandRequest) GetName

func (x *CommandRequest) GetName() string

func (*CommandRequest) ProtoMessage

func (*CommandRequest) ProtoMessage()

func (*CommandRequest) ProtoReflect

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

func (*CommandRequest) Reset

func (x *CommandRequest) Reset()

func (*CommandRequest) String

func (x *CommandRequest) String() string

type CommandResponse

type CommandResponse struct {
	State   State  `protobuf:"varint,1,opt,name=state,proto3,enum=portal.State" json:"state,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandResponse) Descriptor deprecated

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

Deprecated: Use CommandResponse.ProtoReflect.Descriptor instead.

func (*CommandResponse) GetMessage

func (x *CommandResponse) GetMessage() string

func (*CommandResponse) GetState

func (x *CommandResponse) GetState() State

func (*CommandResponse) ProtoMessage

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) ProtoReflect

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

func (*CommandResponse) Reset

func (x *CommandResponse) Reset()

func (*CommandResponse) String

func (x *CommandResponse) String() string

type DRPCPortalClient

type DRPCPortalClient interface {
	DRPCConn() drpc.Conn

	ServiceRestart(ctx context.Context, in *ServiceRequest) (*ServiceResponse, error)
	ServiceStart(ctx context.Context, in *ServiceRequest) (*ServiceResponse, error)
	ServiceStop(ctx context.Context, in *ServiceRequest) (*ServiceResponse, error)
	ServiceStatus(ctx context.Context, in *ServiceRequest) (*ServiceStatusResponse, error)
	RunCommand(ctx context.Context, in *CommandRequest) (*CommandResponse, error)
	CPUusage(ctx context.Context, in *CPUusageRequest) (*CPUusageResponse, error)
}

func NewDRPCPortalClient

func NewDRPCPortalClient(cc drpc.Conn) DRPCPortalClient

type DRPCPortalDescription

type DRPCPortalDescription struct{}

func (DRPCPortalDescription) Method

func (DRPCPortalDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool)

func (DRPCPortalDescription) NumMethods

func (DRPCPortalDescription) NumMethods() int

type DRPCPortalUnimplementedServer

type DRPCPortalUnimplementedServer struct{}

func (*DRPCPortalUnimplementedServer) CPUusage

func (*DRPCPortalUnimplementedServer) RunCommand

func (*DRPCPortalUnimplementedServer) ServiceRestart

func (*DRPCPortalUnimplementedServer) ServiceStart

func (*DRPCPortalUnimplementedServer) ServiceStatus

func (*DRPCPortalUnimplementedServer) ServiceStop

type DRPCPortal_CPUusageStream

type DRPCPortal_CPUusageStream interface {
	drpc.Stream
	SendAndClose(*CPUusageResponse) error
}

type DRPCPortal_RunCommandStream

type DRPCPortal_RunCommandStream interface {
	drpc.Stream
	SendAndClose(*CommandResponse) error
}

type DRPCPortal_ServiceRestartStream

type DRPCPortal_ServiceRestartStream interface {
	drpc.Stream
	SendAndClose(*ServiceResponse) error
}

type DRPCPortal_ServiceStartStream

type DRPCPortal_ServiceStartStream interface {
	drpc.Stream
	SendAndClose(*ServiceResponse) error
}

type DRPCPortal_ServiceStatusStream

type DRPCPortal_ServiceStatusStream interface {
	drpc.Stream
	SendAndClose(*ServiceStatusResponse) error
}

type DRPCPortal_ServiceStopStream

type DRPCPortal_ServiceStopStream interface {
	drpc.Stream
	SendAndClose(*ServiceResponse) error
}

type ServiceRequest

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

func (*ServiceRequest) Descriptor deprecated

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

Deprecated: Use ServiceRequest.ProtoReflect.Descriptor instead.

func (*ServiceRequest) GetName

func (x *ServiceRequest) GetName() string

func (*ServiceRequest) ProtoMessage

func (*ServiceRequest) ProtoMessage()

func (*ServiceRequest) ProtoReflect

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

func (*ServiceRequest) Reset

func (x *ServiceRequest) Reset()

func (*ServiceRequest) String

func (x *ServiceRequest) String() string

type ServiceResponse

type ServiceResponse struct {
	State   State  `protobuf:"varint,1,opt,name=state,proto3,enum=portal.State" json:"state,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceResponse) Descriptor deprecated

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

Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead.

func (*ServiceResponse) GetMessage

func (x *ServiceResponse) GetMessage() string

func (*ServiceResponse) GetState

func (x *ServiceResponse) GetState() State

func (*ServiceResponse) ProtoMessage

func (*ServiceResponse) ProtoMessage()

func (*ServiceResponse) ProtoReflect

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

func (*ServiceResponse) Reset

func (x *ServiceResponse) Reset()

func (*ServiceResponse) String

func (x *ServiceResponse) String() string

type ServiceStatusResponse

type ServiceStatusResponse struct {
	State       State  `protobuf:"varint,1,opt,name=state,proto3,enum=portal.State" json:"state,omitempty"`
	Loadstate   string `protobuf:"bytes,2,opt,name=loadstate,proto3" json:"loadstate,omitempty"`
	Activestate string `protobuf:"bytes,3,opt,name=activestate,proto3" json:"activestate,omitempty"`
	Substate    string `protobuf:"bytes,4,opt,name=substate,proto3" json:"substate,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceStatusResponse) Descriptor deprecated

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

Deprecated: Use ServiceStatusResponse.ProtoReflect.Descriptor instead.

func (*ServiceStatusResponse) GetActivestate

func (x *ServiceStatusResponse) GetActivestate() string

func (*ServiceStatusResponse) GetLoadstate

func (x *ServiceStatusResponse) GetLoadstate() string

func (*ServiceStatusResponse) GetState

func (x *ServiceStatusResponse) GetState() State

func (*ServiceStatusResponse) GetSubstate

func (x *ServiceStatusResponse) GetSubstate() string

func (*ServiceStatusResponse) ProtoMessage

func (*ServiceStatusResponse) ProtoMessage()

func (*ServiceStatusResponse) ProtoReflect

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

func (*ServiceStatusResponse) Reset

func (x *ServiceStatusResponse) Reset()

func (*ServiceStatusResponse) String

func (x *ServiceStatusResponse) String() string

type State

type State int32
const (
	State_UNKNOWN   State = 0
	State_CHANGED   State = 1
	State_UNCHANGED State = 2
)

func (State) Descriptor

func (State) Descriptor() protoreflect.EnumDescriptor

func (State) Enum

func (x State) Enum() *State

func (State) EnumDescriptor deprecated

func (State) EnumDescriptor() ([]byte, []int)

Deprecated: Use State.Descriptor instead.

func (State) Number

func (x State) Number() protoreflect.EnumNumber

func (State) String

func (x State) String() string

func (State) Type

func (State) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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