v0

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Runtime_Load_FullMethodName        = "/services.runtime.v0.Runtime/Load"
	Runtime_Init_FullMethodName        = "/services.runtime.v0.Runtime/Init"
	Runtime_Start_FullMethodName       = "/services.runtime.v0.Runtime/Start"
	Runtime_Stop_FullMethodName        = "/services.runtime.v0.Runtime/Stop"
	Runtime_Information_FullMethodName = "/services.runtime.v0.Runtime/Information"
	Runtime_Communicate_FullMethodName = "/services.runtime.v0.Runtime/Communicate"
)

Variables

View Source
var (
	LoadStatus_State_name = map[int32]string{
		0: "UNKNOWN",
		1: "READY",
		2: "ERROR",
	}
	LoadStatus_State_value = map[string]int32{
		"UNKNOWN": 0,
		"READY":   1,
		"ERROR":   2,
	}
)

Enum value maps for LoadStatus_State.

View Source
var (
	InitStatus_State_name = map[int32]string{
		0: "UNKNOWN",
		1: "READY",
		2: "ERROR",
	}
	InitStatus_State_value = map[string]int32{
		"UNKNOWN": 0,
		"READY":   1,
		"ERROR":   2,
	}
)

Enum value maps for InitStatus_State.

View Source
var (
	StartStatus_State_name = map[int32]string{
		0: "UNKNOWN",
		1: "STARTED",
		2: "ERROR",
	}
	StartStatus_State_value = map[string]int32{
		"UNKNOWN": 0,
		"STARTED": 1,
		"ERROR":   2,
	}
)

Enum value maps for StartStatus_State.

View Source
var (
	DesiredState_Stage_name = map[int32]string{
		0: "UNKNOWN",
		1: "NOOP",
		2: "LOAD",
		3: "INIT",
		4: "START",
	}
	DesiredState_Stage_value = map[string]int32{
		"UNKNOWN": 0,
		"NOOP":    1,
		"LOAD":    2,
		"INIT":    3,
		"START":   4,
	}
)

Enum value maps for DesiredState_Stage.

View Source
var File_services_runtime_v0_runtime_proto protoreflect.FileDescriptor
View Source
var Runtime_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "services.runtime.v0.Runtime",
	HandlerType: (*RuntimeServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Load",
			Handler:    _Runtime_Load_Handler,
		},
		{
			MethodName: "Init",
			Handler:    _Runtime_Init_Handler,
		},
		{
			MethodName: "Start",
			Handler:    _Runtime_Start_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _Runtime_Stop_Handler,
		},
		{
			MethodName: "Information",
			Handler:    _Runtime_Information_Handler,
		},
		{
			MethodName: "Communicate",
			Handler:    _Runtime_Communicate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "services/runtime/v0/runtime.proto",
}

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

Functions

func RegisterRuntimeServer

func RegisterRuntimeServer(s grpc.ServiceRegistrar, srv RuntimeServer)

Types

type DesiredState added in v0.1.20

type DesiredState struct {
	Stage DesiredState_Stage `protobuf:"varint,1,opt,name=stage,proto3,enum=services.runtime.v0.DesiredState_Stage" json:"stage,omitempty"`
	// contains filtered or unexported fields
}

func (*DesiredState) Descriptor deprecated added in v0.1.20

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

Deprecated: Use DesiredState.ProtoReflect.Descriptor instead.

func (*DesiredState) GetStage added in v0.1.20

func (x *DesiredState) GetStage() DesiredState_Stage

func (*DesiredState) ProtoMessage added in v0.1.20

func (*DesiredState) ProtoMessage()

func (*DesiredState) ProtoReflect added in v0.1.20

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

func (*DesiredState) Reset added in v0.1.20

func (x *DesiredState) Reset()

func (*DesiredState) String added in v0.1.20

func (x *DesiredState) String() string

type DesiredState_Stage added in v0.1.20

type DesiredState_Stage int32
const (
	DesiredState_UNKNOWN DesiredState_Stage = 0
	DesiredState_NOOP    DesiredState_Stage = 1
	DesiredState_LOAD    DesiredState_Stage = 2
	DesiredState_INIT    DesiredState_Stage = 3
	DesiredState_START   DesiredState_Stage = 4
)

func (DesiredState_Stage) Descriptor added in v0.1.20

func (DesiredState_Stage) Enum added in v0.1.20

func (DesiredState_Stage) EnumDescriptor deprecated added in v0.1.20

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

Deprecated: Use DesiredState_Stage.Descriptor instead.

func (DesiredState_Stage) Number added in v0.1.20

func (DesiredState_Stage) String added in v0.1.20

func (x DesiredState_Stage) String() string

func (DesiredState_Stage) Type added in v0.1.20

type InformationRequest

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

func (*InformationRequest) Descriptor deprecated

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

Deprecated: Use InformationRequest.ProtoReflect.Descriptor instead.

func (*InformationRequest) ProtoMessage

func (*InformationRequest) ProtoMessage()

func (*InformationRequest) ProtoReflect

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

func (*InformationRequest) Reset

func (x *InformationRequest) Reset()

func (*InformationRequest) String

func (x *InformationRequest) String() string

type InformationResponse

type InformationResponse struct {
	LoadStatus   *LoadStatus   `protobuf:"bytes,1,opt,name=load_status,json=loadStatus,proto3" json:"load_status,omitempty"`
	InitStatus   *InitStatus   `protobuf:"bytes,2,opt,name=init_status,json=initStatus,proto3" json:"init_status,omitempty"`
	StartStatus  *StartStatus  `protobuf:"bytes,3,opt,name=start_status,json=startStatus,proto3" json:"start_status,omitempty"`
	DesiredState *DesiredState `protobuf:"bytes,4,opt,name=desired_state,json=desiredState,proto3" json:"desired_state,omitempty"`
	// contains filtered or unexported fields
}

InformationResponse represents the overall state of the service

func (*InformationResponse) Descriptor deprecated

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

Deprecated: Use InformationResponse.ProtoReflect.Descriptor instead.

func (*InformationResponse) GetDesiredState

func (x *InformationResponse) GetDesiredState() *DesiredState

func (*InformationResponse) GetInitStatus added in v0.1.20

func (x *InformationResponse) GetInitStatus() *InitStatus

func (*InformationResponse) GetLoadStatus added in v0.1.20

func (x *InformationResponse) GetLoadStatus() *LoadStatus

func (*InformationResponse) GetStartStatus added in v0.1.20

func (x *InformationResponse) GetStartStatus() *StartStatus

func (*InformationResponse) ProtoMessage

func (*InformationResponse) ProtoMessage()

func (*InformationResponse) ProtoReflect

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

func (*InformationResponse) Reset

func (x *InformationResponse) Reset()

func (*InformationResponse) String

func (x *InformationResponse) String() string

type InitRequest

type InitRequest struct {

	// Environment for the service
	// NetworkMappings require to know the environment
	Environment *v0.Environment `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"`
	// Network mappings for the service
	NetworkMappings []*v0.NetworkMapping `protobuf:"bytes,2,rep,name=network_mappings,json=networkMappings,proto3" json:"network_mappings,omitempty"`
	// Endpoints for the dependencies
	DependenciesEndpoints []*v0.Endpoint `protobuf:"bytes,3,rep,name=dependencies_endpoints,json=dependenciesEndpoints,proto3" json:"dependencies_endpoints,omitempty"`
	// Provider information required by the service
	ProviderInfos []*v0.ProviderInformation `protobuf:"bytes,4,rep,name=provider_infos,json=providerInfos,proto3" json:"provider_infos,omitempty"`
	// contains filtered or unexported fields
}

func (*InitRequest) Descriptor deprecated

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

Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.

func (*InitRequest) GetDependenciesEndpoints

func (x *InitRequest) GetDependenciesEndpoints() []*v0.Endpoint

func (*InitRequest) GetEnvironment added in v0.1.20

func (x *InitRequest) GetEnvironment() *v0.Environment

func (*InitRequest) GetNetworkMappings added in v0.1.22

func (x *InitRequest) GetNetworkMappings() []*v0.NetworkMapping

func (*InitRequest) GetProviderInfos added in v0.1.6

func (x *InitRequest) GetProviderInfos() []*v0.ProviderInformation

func (*InitRequest) ProtoMessage

func (*InitRequest) ProtoMessage()

func (*InitRequest) ProtoReflect

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

func (*InitRequest) Reset

func (x *InitRequest) Reset()

func (*InitRequest) String

func (x *InitRequest) String() string

type InitResponse

type InitResponse struct {
	Status *InitStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// A Service can act as a provider
	ServiceProviderInfos []*v0.ProviderInformation `protobuf:"bytes,3,rep,name=service_provider_infos,json=serviceProviderInfos,proto3" json:"service_provider_infos,omitempty"`
	// contains filtered or unexported fields
}

func (*InitResponse) Descriptor deprecated

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

Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.

func (*InitResponse) GetServiceProviderInfos added in v0.1.6

func (x *InitResponse) GetServiceProviderInfos() []*v0.ProviderInformation

func (*InitResponse) GetStatus

func (x *InitResponse) GetStatus() *InitStatus

func (*InitResponse) ProtoMessage

func (*InitResponse) ProtoMessage()

func (*InitResponse) ProtoReflect

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

func (*InitResponse) Reset

func (x *InitResponse) Reset()

func (*InitResponse) String

func (x *InitResponse) String() string

type InitStatus

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

func (*InitStatus) Descriptor deprecated

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

Deprecated: Use InitStatus.ProtoReflect.Descriptor instead.

func (*InitStatus) GetMessage

func (x *InitStatus) GetMessage() string

func (*InitStatus) GetState

func (x *InitStatus) GetState() InitStatus_State

func (*InitStatus) ProtoMessage

func (*InitStatus) ProtoMessage()

func (*InitStatus) ProtoReflect

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

func (*InitStatus) Reset

func (x *InitStatus) Reset()

func (*InitStatus) String

func (x *InitStatus) String() string

type InitStatus_State

type InitStatus_State int32
const (
	InitStatus_UNKNOWN InitStatus_State = 0
	InitStatus_READY   InitStatus_State = 1
	InitStatus_ERROR   InitStatus_State = 2
)

func (InitStatus_State) Descriptor

func (InitStatus_State) Enum

func (InitStatus_State) EnumDescriptor deprecated

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

Deprecated: Use InitStatus_State.Descriptor instead.

func (InitStatus_State) Number

func (InitStatus_State) String

func (x InitStatus_State) String() string

func (InitStatus_State) Type

type LoadRequest

type LoadRequest struct {
	Debug bool `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"` // Developer debug
	// Identity of the service
	Identity *v0.ServiceIdentity `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadRequest) Descriptor deprecated

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

Deprecated: Use LoadRequest.ProtoReflect.Descriptor instead.

func (*LoadRequest) GetDebug

func (x *LoadRequest) GetDebug() bool

func (*LoadRequest) GetIdentity

func (x *LoadRequest) GetIdentity() *v0.ServiceIdentity

func (*LoadRequest) ProtoMessage

func (*LoadRequest) ProtoMessage()

func (*LoadRequest) ProtoReflect

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

func (*LoadRequest) Reset

func (x *LoadRequest) Reset()

func (*LoadRequest) String

func (x *LoadRequest) String() string

type LoadResponse

type LoadResponse struct {
	Version *v0.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Status  *LoadStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// Endpoints exposed by the service
	Endpoints []*v0.Endpoint `protobuf:"bytes,3,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// Each service can act as a service provider in its own right
	ServiceProviderInfos []*v0.ProviderInformation `protobuf:"bytes,4,rep,name=service_provider_infos,json=serviceProviderInfos,proto3" json:"service_provider_infos,omitempty"`
	// contains filtered or unexported fields
}

func (*LoadResponse) Descriptor deprecated

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

Deprecated: Use LoadResponse.ProtoReflect.Descriptor instead.

func (*LoadResponse) GetEndpoints

func (x *LoadResponse) GetEndpoints() []*v0.Endpoint

func (*LoadResponse) GetServiceProviderInfos added in v0.1.6

func (x *LoadResponse) GetServiceProviderInfos() []*v0.ProviderInformation

func (*LoadResponse) GetStatus

func (x *LoadResponse) GetStatus() *LoadStatus

func (*LoadResponse) GetVersion

func (x *LoadResponse) GetVersion() *v0.Version

func (*LoadResponse) ProtoMessage

func (*LoadResponse) ProtoMessage()

func (*LoadResponse) ProtoReflect

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

func (*LoadResponse) Reset

func (x *LoadResponse) Reset()

func (*LoadResponse) String

func (x *LoadResponse) String() string

type LoadStatus

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

func (*LoadStatus) Descriptor deprecated

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

Deprecated: Use LoadStatus.ProtoReflect.Descriptor instead.

func (*LoadStatus) GetMessage

func (x *LoadStatus) GetMessage() string

func (*LoadStatus) GetState

func (x *LoadStatus) GetState() LoadStatus_State

func (*LoadStatus) ProtoMessage

func (*LoadStatus) ProtoMessage()

func (*LoadStatus) ProtoReflect

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

func (*LoadStatus) Reset

func (x *LoadStatus) Reset()

func (*LoadStatus) String

func (x *LoadStatus) String() string

type LoadStatus_State

type LoadStatus_State int32
const (
	LoadStatus_UNKNOWN LoadStatus_State = 0
	LoadStatus_READY   LoadStatus_State = 1
	LoadStatus_ERROR   LoadStatus_State = 2
)

func (LoadStatus_State) Descriptor

func (LoadStatus_State) Enum

func (LoadStatus_State) EnumDescriptor deprecated

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

Deprecated: Use LoadStatus_State.Descriptor instead.

func (LoadStatus_State) Number

func (LoadStatus_State) String

func (x LoadStatus_State) String() string

func (LoadStatus_State) Type

type RuntimeClient

type RuntimeClient interface {
	// Load the Service Agent: this should be a NoOp and never fails
	Load(ctx context.Context, in *LoadRequest, opts ...grpc.CallOption) (*LoadResponse, error)
	// Init the Service Agent: could include steps like compilation, configuration, etc.
	// An important step of Initialization is to get the list of network mappings
	Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error)
	// Start the underlying service
	Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
	// Stop the underlying service and cleanup
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
	// Information about the state of the service
	Information(ctx context.Context, in *InformationRequest, opts ...grpc.CallOption) (*InformationResponse, error)
	// Communication helper
	Communicate(ctx context.Context, in *v0.Engage, opts ...grpc.CallOption) (*v0.InformationRequest, error)
}

RuntimeClient is the client API for Runtime 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 NewRuntimeClient

func NewRuntimeClient(cc grpc.ClientConnInterface) RuntimeClient

type RuntimeServer

type RuntimeServer interface {
	// Load the Service Agent: this should be a NoOp and never fails
	Load(context.Context, *LoadRequest) (*LoadResponse, error)
	// Init the Service Agent: could include steps like compilation, configuration, etc.
	// An important step of Initialization is to get the list of network mappings
	Init(context.Context, *InitRequest) (*InitResponse, error)
	// Start the underlying service
	Start(context.Context, *StartRequest) (*StartResponse, error)
	// Stop the underlying service and cleanup
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// Information about the state of the service
	Information(context.Context, *InformationRequest) (*InformationResponse, error)
	// Communication helper
	Communicate(context.Context, *v0.Engage) (*v0.InformationRequest, error)
	// contains filtered or unexported methods
}

RuntimeServer is the server API for Runtime service. All implementations must embed UnimplementedRuntimeServer for forward compatibility

type StartRequest

type StartRequest struct {
	OtherNetworkMappings []*v0.NetworkMapping `protobuf:"bytes,1,rep,name=other_network_mappings,json=otherNetworkMappings,proto3" json:"other_network_mappings,omitempty"`
	// contains filtered or unexported fields
}

func (*StartRequest) Descriptor deprecated

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

Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.

func (*StartRequest) GetOtherNetworkMappings added in v0.1.20

func (x *StartRequest) GetOtherNetworkMappings() []*v0.NetworkMapping

func (*StartRequest) ProtoMessage

func (*StartRequest) ProtoMessage()

func (*StartRequest) ProtoReflect

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

func (*StartRequest) Reset

func (x *StartRequest) Reset()

func (*StartRequest) String

func (x *StartRequest) String() string

type StartResponse

type StartResponse struct {
	Status *StartStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*StartResponse) Descriptor deprecated

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

Deprecated: Use StartResponse.ProtoReflect.Descriptor instead.

func (*StartResponse) GetStatus

func (x *StartResponse) GetStatus() *StartStatus

func (*StartResponse) ProtoMessage

func (*StartResponse) ProtoMessage()

func (*StartResponse) ProtoReflect

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

func (*StartResponse) Reset

func (x *StartResponse) Reset()

func (*StartResponse) String

func (x *StartResponse) String() string

type StartStatus

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

func (*StartStatus) Descriptor deprecated

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

Deprecated: Use StartStatus.ProtoReflect.Descriptor instead.

func (*StartStatus) GetMessage

func (x *StartStatus) GetMessage() string

func (*StartStatus) GetState

func (x *StartStatus) GetState() StartStatus_State

func (*StartStatus) ProtoMessage

func (*StartStatus) ProtoMessage()

func (*StartStatus) ProtoReflect

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

func (*StartStatus) Reset

func (x *StartStatus) Reset()

func (*StartStatus) String

func (x *StartStatus) String() string

type StartStatus_State

type StartStatus_State int32
const (
	StartStatus_UNKNOWN StartStatus_State = 0
	StartStatus_STARTED StartStatus_State = 1
	StartStatus_ERROR   StartStatus_State = 2
)

func (StartStatus_State) Descriptor

func (StartStatus_State) Enum

func (StartStatus_State) EnumDescriptor deprecated

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

Deprecated: Use StartStatus_State.Descriptor instead.

func (StartStatus_State) Number

func (StartStatus_State) String

func (x StartStatus_State) String() string

func (StartStatus_State) Type

type StopRequest

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

func (*StopRequest) Descriptor deprecated

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

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

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

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

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

func (*StopResponse) Descriptor deprecated

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

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

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

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type UnimplementedRuntimeServer

type UnimplementedRuntimeServer struct {
}

UnimplementedRuntimeServer must be embedded to have forward compatible implementations.

func (UnimplementedRuntimeServer) Communicate

func (UnimplementedRuntimeServer) Information

func (UnimplementedRuntimeServer) Init

func (UnimplementedRuntimeServer) Load

func (UnimplementedRuntimeServer) Start

func (UnimplementedRuntimeServer) Stop

type UnsafeRuntimeServer

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

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

Jump to

Keyboard shortcuts

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