plantctl

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Service_State_name = map[int32]string{
	0: "DEFAULT",
	1: "STOPPED",
	2: "RUNNING",
}
View Source
var Service_State_value = map[string]int32{
	"DEFAULT": 0,
	"STOPPED": 1,
	"RUNNING": 2,
}

Functions

func RegisterManagerServer

func RegisterManagerServer(s *grpc.Server, srv ManagerServer)

Types

type DeployRequest

type DeployRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeployRequest) Descriptor

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

func (*DeployRequest) GetName

func (m *DeployRequest) GetName() string

func (*DeployRequest) ProtoMessage

func (*DeployRequest) ProtoMessage()

func (*DeployRequest) Reset

func (m *DeployRequest) Reset()

func (*DeployRequest) String

func (m *DeployRequest) String() string

func (*DeployRequest) XXX_DiscardUnknown

func (m *DeployRequest) XXX_DiscardUnknown()

func (*DeployRequest) XXX_Marshal

func (m *DeployRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeployRequest) XXX_Merge

func (dst *DeployRequest) XXX_Merge(src proto.Message)

func (*DeployRequest) XXX_Size

func (m *DeployRequest) XXX_Size() int

func (*DeployRequest) XXX_Unmarshal

func (m *DeployRequest) XXX_Unmarshal(b []byte) error

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (dst *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type Error

type Error struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Error) Descriptor

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

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (dst *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error

type LogEntry

type LogEntry struct {
	Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LogEntry) Descriptor

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

func (*LogEntry) GetMessage

func (m *LogEntry) GetMessage() string

func (*LogEntry) GetService

func (m *LogEntry) GetService() string

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) String

func (m *LogEntry) String() string

func (*LogEntry) XXX_DiscardUnknown

func (m *LogEntry) XXX_DiscardUnknown()

func (*LogEntry) XXX_Marshal

func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogEntry) XXX_Merge

func (dst *LogEntry) XXX_Merge(src proto.Message)

func (*LogEntry) XXX_Size

func (m *LogEntry) XXX_Size() int

func (*LogEntry) XXX_Unmarshal

func (m *LogEntry) XXX_Unmarshal(b []byte) error

type ManagerClient

type ManagerClient interface {
	// Start configured plantd services
	Start(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Response, error)
	// Stop configured plantd services
	Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Response, error)
	// Restart configured plantd services
	Restart(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Response, error)
	// Check the status of configured plantd services
	Status(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ServiceResponse, error)
	// Stream log messages for configured plantd services
	Watch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Manager_WatchClient, error)
	// Receive updates when configured services change
	Monitor(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Manager_MonitorClient, error)
	// Install a plantd system
	Install(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Response, error)
	// Uninstall a plantd system
	Uninstall(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Response, error)
	// Upgrade a plantd system
	Upgrade(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Response, error)
	// Patch a plantd system
	Patch(ctx context.Context, in *PatchRequest, opts ...grpc.CallOption) (*Response, error)
	// Deploy a plantd system from a repository
	Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*Response, error)
	// Ping a plantd system
	// TODO: implement the gRPC health checking protocol
	Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Response, error)
}

ManagerClient is the client API for Manager service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewManagerClient

func NewManagerClient(cc *grpc.ClientConn) ManagerClient

type ManagerServer

type ManagerServer interface {
	// Start configured plantd services
	Start(context.Context, *Empty) (*Response, error)
	// Stop configured plantd services
	Stop(context.Context, *Empty) (*Response, error)
	// Restart configured plantd services
	Restart(context.Context, *Empty) (*Response, error)
	// Check the status of configured plantd services
	Status(context.Context, *Empty) (*ServiceResponse, error)
	// Stream log messages for configured plantd services
	Watch(*Empty, Manager_WatchServer) error
	// Receive updates when configured services change
	Monitor(*Empty, Manager_MonitorServer) error
	// Install a plantd system
	Install(context.Context, *Empty) (*Response, error)
	// Uninstall a plantd system
	Uninstall(context.Context, *Empty) (*Response, error)
	// Upgrade a plantd system
	Upgrade(context.Context, *Empty) (*Response, error)
	// Patch a plantd system
	Patch(context.Context, *PatchRequest) (*Response, error)
	// Deploy a plantd system from a repository
	Deploy(context.Context, *DeployRequest) (*Response, error)
	// Ping a plantd system
	// TODO: implement the gRPC health checking protocol
	Ping(context.Context, *Empty) (*Response, error)
}

ManagerServer is the server API for Manager service.

type Manager_MonitorClient

type Manager_MonitorClient interface {
	Recv() (*Service, error)
	grpc.ClientStream
}

type Manager_MonitorServer

type Manager_MonitorServer interface {
	Send(*Service) error
	grpc.ServerStream
}

type Manager_WatchClient

type Manager_WatchClient interface {
	Recv() (*LogEntry, error)
	grpc.ClientStream
}

type Manager_WatchServer

type Manager_WatchServer interface {
	Send(*LogEntry) error
	grpc.ServerStream
}

type PatchRequest

type PatchRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PatchRequest) Descriptor

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

func (*PatchRequest) GetName

func (m *PatchRequest) GetName() string

func (*PatchRequest) ProtoMessage

func (*PatchRequest) ProtoMessage()

func (*PatchRequest) Reset

func (m *PatchRequest) Reset()

func (*PatchRequest) String

func (m *PatchRequest) String() string

func (*PatchRequest) XXX_DiscardUnknown

func (m *PatchRequest) XXX_DiscardUnknown()

func (*PatchRequest) XXX_Marshal

func (m *PatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PatchRequest) XXX_Merge

func (dst *PatchRequest) XXX_Merge(src proto.Message)

func (*PatchRequest) XXX_Size

func (m *PatchRequest) XXX_Size() int

func (*PatchRequest) XXX_Unmarshal

func (m *PatchRequest) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	Code                 int32    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Error                *Error   `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetCode

func (m *Response) GetCode() int32

func (*Response) GetError

func (m *Response) GetError() *Error

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type Service

type Service struct {
	Target               string        `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	State                Service_State `protobuf:"varint,2,opt,name=state,proto3,enum=plantctl.Service_State" json:"state,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*Service) Descriptor

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

func (*Service) GetState

func (m *Service) GetState() Service_State

func (*Service) GetTarget

func (m *Service) GetTarget() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) String

func (m *Service) String() string

func (*Service) XXX_DiscardUnknown

func (m *Service) XXX_DiscardUnknown()

func (*Service) XXX_Marshal

func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Service) XXX_Merge

func (dst *Service) XXX_Merge(src proto.Message)

func (*Service) XXX_Size

func (m *Service) XXX_Size() int

func (*Service) XXX_Unmarshal

func (m *Service) XXX_Unmarshal(b []byte) error

type ServiceResponse

type ServiceResponse struct {
	Code                 int32      `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Error                *Error     `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	Services             []*Service `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ServiceResponse) Descriptor

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

func (*ServiceResponse) GetCode

func (m *ServiceResponse) GetCode() int32

func (*ServiceResponse) GetError

func (m *ServiceResponse) GetError() *Error

func (*ServiceResponse) GetServices

func (m *ServiceResponse) GetServices() []*Service

func (*ServiceResponse) ProtoMessage

func (*ServiceResponse) ProtoMessage()

func (*ServiceResponse) Reset

func (m *ServiceResponse) Reset()

func (*ServiceResponse) String

func (m *ServiceResponse) String() string

func (*ServiceResponse) XXX_DiscardUnknown

func (m *ServiceResponse) XXX_DiscardUnknown()

func (*ServiceResponse) XXX_Marshal

func (m *ServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceResponse) XXX_Merge

func (dst *ServiceResponse) XXX_Merge(src proto.Message)

func (*ServiceResponse) XXX_Size

func (m *ServiceResponse) XXX_Size() int

func (*ServiceResponse) XXX_Unmarshal

func (m *ServiceResponse) XXX_Unmarshal(b []byte) error

type Service_State

type Service_State int32
const (
	Service_DEFAULT Service_State = 0
	Service_STOPPED Service_State = 1
	Service_RUNNING Service_State = 2
)

func (Service_State) EnumDescriptor

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

func (Service_State) String

func (x Service_State) String() string

Jump to

Keyboard shortcuts

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