service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProcessState_name = map[int32]string{
		0: "StateStopped",
		1: "StateStarting",
		2: "StateRunning",
		3: "StateBackoff",
		4: "StateStopping",
		5: "StateExited",
		6: "StateFatal",
		7: "StateUnknown",
	}
	ProcessState_value = map[string]int32{
		"StateStopped":  0,
		"StateStarting": 1,
		"StateRunning":  2,
		"StateBackoff":  3,
		"StateStopping": 4,
		"StateExited":   5,
		"StateFatal":    6,
		"StateUnknown":  7,
	}
)

Enum value maps for ProcessState.

View Source
var File_pkg_agent_app_service_pb_service_proto protoreflect.FileDescriptor
View Source
var ServiceLifecycle_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "service.ServiceLifecycle",
	HandlerType: (*ServiceLifecycleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StartService",
			Handler:    _ServiceLifecycle_StartService_Handler,
		},
		{
			MethodName: "StopService",
			Handler:    _ServiceLifecycle_StopService_Handler,
		},
		{
			MethodName: "RestartService",
			Handler:    _ServiceLifecycle_RestartService_Handler,
		},
		{
			MethodName: "GetServiceStatus",
			Handler:    _ServiceLifecycle_GetServiceStatus_Handler,
		},
		{
			MethodName: "CheckServiceStatus",
			Handler:    _ServiceLifecycle_CheckServiceStatus_Handler,
		},
		{
			MethodName: "CheckServiceStopped",
			Handler:    _ServiceLifecycle_CheckServiceStopped_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/agent/app/service/pb/service.proto",
}

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

Functions

func RegisterServiceLifecycleServer

func RegisterServiceLifecycleServer(s grpc.ServiceRegistrar, srv ServiceLifecycleServer)

Types

type ProcessState

type ProcessState int32
const (
	ProcessState_StateStopped  ProcessState = 0
	ProcessState_StateStarting ProcessState = 1
	ProcessState_StateRunning  ProcessState = 2
	ProcessState_StateBackoff  ProcessState = 3
	ProcessState_StateStopping ProcessState = 4
	ProcessState_StateExited   ProcessState = 5
	ProcessState_StateFatal    ProcessState = 6
	ProcessState_StateUnknown  ProcessState = 7
)

func (ProcessState) Descriptor

func (ProcessState) Enum

func (x ProcessState) Enum() *ProcessState

func (ProcessState) EnumDescriptor deprecated

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

Deprecated: Use ProcessState.Descriptor instead.

func (ProcessState) Number

func (ProcessState) String

func (x ProcessState) String() string

func (ProcessState) Type

type ServiceLifecycleClient

type ServiceLifecycleClient interface {
	StartService(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceResponse, error)
	StopService(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceResponse, error)
	RestartService(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceResponse, error)
	GetServiceStatus(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceStatusResponse, error)
	CheckServiceStatus(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceResponse, error)
	CheckServiceStopped(ctx context.Context, in *ServiceRequest, opts ...grpc.CallOption) (*ServiceResponse, error)
}

ServiceLifecycleClient is the client API for ServiceLifecycle 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.

type ServiceLifecycleServer

type ServiceLifecycleServer interface {
	StartService(context.Context, *ServiceRequest) (*ServiceResponse, error)
	StopService(context.Context, *ServiceRequest) (*ServiceResponse, error)
	RestartService(context.Context, *ServiceRequest) (*ServiceResponse, error)
	GetServiceStatus(context.Context, *ServiceRequest) (*ServiceStatusResponse, error)
	CheckServiceStatus(context.Context, *ServiceRequest) (*ServiceResponse, error)
	CheckServiceStopped(context.Context, *ServiceRequest) (*ServiceResponse, error)
	// contains filtered or unexported methods
}

ServiceLifecycleServer is the server API for ServiceLifecycle service. All implementations must embed UnimplementedServiceLifecycleServer for forward compatibility

type ServiceRequest

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

func (*ServiceRequest) Descriptor deprecated

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

Deprecated: Use ServiceRequest.ProtoReflect.Descriptor instead.

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 {
	Message string `protobuf:"bytes,1,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) 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 {
	ServiceStatus ProcessState `protobuf:"varint,1,opt,name=ServiceStatus,proto3,enum=service.ProcessState" json:"ServiceStatus,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceStatusResponse) Descriptor deprecated

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

Deprecated: Use ServiceStatusResponse.ProtoReflect.Descriptor instead.

func (*ServiceStatusResponse) GetServiceStatus

func (x *ServiceStatusResponse) GetServiceStatus() ProcessState

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 UnimplementedServiceLifecycleServer

type UnimplementedServiceLifecycleServer struct {
}

UnimplementedServiceLifecycleServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceLifecycleServer) CheckServiceStatus

func (UnimplementedServiceLifecycleServer) CheckServiceStopped

func (UnimplementedServiceLifecycleServer) GetServiceStatus

func (UnimplementedServiceLifecycleServer) RestartService

func (UnimplementedServiceLifecycleServer) StartService

func (UnimplementedServiceLifecycleServer) StopService

type UnsafeServiceLifecycleServer

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

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

Jump to

Keyboard shortcuts

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