services

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CONNECTIONSTATUS_name = map[int32]string{
		0: "CONNECTIONSTATUS_UNSPECIFIED",
		1: "CONNECTIONSTATUS_AUTHORIZED",
		2: "CONNECTIONSTATUS_CONNECTED",
		3: "CONNECTIONSTATUS_CLOSED",
	}
	CONNECTIONSTATUS_value = map[string]int32{
		"CONNECTIONSTATUS_UNSPECIFIED": 0,
		"CONNECTIONSTATUS_AUTHORIZED":  1,
		"CONNECTIONSTATUS_CONNECTED":   2,
		"CONNECTIONSTATUS_CLOSED":      3,
	}
)

Enum value maps for CONNECTIONSTATUS.

View Source
var (
	SESSIONSTATUS_name = map[int32]string{
		0: "SESSIONSTATUS_UNSPECIFIED",
		1: "SESSIONSTATUS_PENDING",
		2: "SESSIONSTATUS_ACTIVE",
		3: "SESSIONSTATUS_CANCELING",
		4: "SESSIONSTATUS_TERMINATED",
	}
	SESSIONSTATUS_value = map[string]int32{
		"SESSIONSTATUS_UNSPECIFIED": 0,
		"SESSIONSTATUS_PENDING":     1,
		"SESSIONSTATUS_ACTIVE":      2,
		"SESSIONSTATUS_CANCELING":   3,
		"SESSIONSTATUS_TERMINATED":  4,
	}
)

Enum value maps for SESSIONSTATUS.

View Source
var (
	JOBTYPE_name = map[int32]string{
		0: "JOBTYPE_UNSPECIFIED",
		1: "JOBTYPE_SESSION",
	}
	JOBTYPE_value = map[string]int32{
		"JOBTYPE_UNSPECIFIED": 0,
		"JOBTYPE_SESSION":     1,
	}
)

Enum value maps for JOBTYPE.

View Source
var (
	CHANGETYPE_name = map[int32]string{
		0: "CHANGETYPE_UNSPECIFIED",
		1: "CHANGETYPE_UPDATE_STATE",
	}
	CHANGETYPE_value = map[string]int32{
		"CHANGETYPE_UNSPECIFIED":  0,
		"CHANGETYPE_UPDATE_STATE": 1,
	}
)

Enum value maps for CHANGETYPE.

View Source
var File_controller_servers_services_v1_server_coordination_service_proto protoreflect.FileDescriptor
View Source
var File_controller_servers_services_v1_session_service_proto protoreflect.FileDescriptor
View Source
var ServerCoordinationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "controller.servers.services.v1.ServerCoordinationService",
	HandlerType: (*ServerCoordinationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Status",
			Handler:    _ServerCoordinationService_Status_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "controller/servers/services/v1/server_coordination_service.proto",
}

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

View Source
var SessionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "controller.servers.services.v1.SessionService",
	HandlerType: (*SessionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "LookupSession",
			Handler:    _SessionService_LookupSession_Handler,
		},
		{
			MethodName: "ActivateSession",
			Handler:    _SessionService_ActivateSession_Handler,
		},
		{
			MethodName: "CancelSession",
			Handler:    _SessionService_CancelSession_Handler,
		},
		{
			MethodName: "AuthorizeConnection",
			Handler:    _SessionService_AuthorizeConnection_Handler,
		},
		{
			MethodName: "ConnectConnection",
			Handler:    _SessionService_ConnectConnection_Handler,
		},
		{
			MethodName: "CloseConnection",
			Handler:    _SessionService_CloseConnection_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "controller/servers/services/v1/session_service.proto",
}

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

Functions

func RegisterServerCoordinationServiceServer

func RegisterServerCoordinationServiceServer(s grpc.ServiceRegistrar, srv ServerCoordinationServiceServer)

func RegisterSessionServiceServer

func RegisterSessionServiceServer(s grpc.ServiceRegistrar, srv SessionServiceServer)

Types

type ActivateSessionRequest

type ActivateSessionRequest struct {
	SessionId string        `protobuf:"bytes,10,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	TofuToken string        `protobuf:"bytes,20,opt,name=tofu_token,json=tofuToken,proto3" json:"tofu_token,omitempty"`
	Version   uint32        `protobuf:"varint,30,opt,name=version,proto3" json:"version,omitempty"`
	WorkerId  string        `protobuf:"bytes,40,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
	Status    SESSIONSTATUS `protobuf:"varint,50,opt,name=status,proto3,enum=controller.servers.services.v1.SESSIONSTATUS" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ActivateSessionRequest) Descriptor deprecated

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

Deprecated: Use ActivateSessionRequest.ProtoReflect.Descriptor instead.

func (*ActivateSessionRequest) GetSessionId

func (x *ActivateSessionRequest) GetSessionId() string

func (*ActivateSessionRequest) GetStatus

func (x *ActivateSessionRequest) GetStatus() SESSIONSTATUS

func (*ActivateSessionRequest) GetTofuToken

func (x *ActivateSessionRequest) GetTofuToken() string

func (*ActivateSessionRequest) GetVersion

func (x *ActivateSessionRequest) GetVersion() uint32

func (*ActivateSessionRequest) GetWorkerId

func (x *ActivateSessionRequest) GetWorkerId() string

func (*ActivateSessionRequest) ProtoMessage

func (*ActivateSessionRequest) ProtoMessage()

func (*ActivateSessionRequest) ProtoReflect

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

func (*ActivateSessionRequest) Reset

func (x *ActivateSessionRequest) Reset()

func (*ActivateSessionRequest) String

func (x *ActivateSessionRequest) String() string

type ActivateSessionResponse

type ActivateSessionResponse struct {
	Status SESSIONSTATUS `protobuf:"varint,10,opt,name=status,proto3,enum=controller.servers.services.v1.SESSIONSTATUS" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ActivateSessionResponse) Descriptor deprecated

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

Deprecated: Use ActivateSessionResponse.ProtoReflect.Descriptor instead.

func (*ActivateSessionResponse) GetStatus

func (x *ActivateSessionResponse) GetStatus() SESSIONSTATUS

func (*ActivateSessionResponse) ProtoMessage

func (*ActivateSessionResponse) ProtoMessage()

func (*ActivateSessionResponse) ProtoReflect

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

func (*ActivateSessionResponse) Reset

func (x *ActivateSessionResponse) Reset()

func (*ActivateSessionResponse) String

func (x *ActivateSessionResponse) String() string

type AuthorizeConnectionRequest

type AuthorizeConnectionRequest struct {
	SessionId string `protobuf:"bytes,10,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	WorkerId  string `protobuf:"bytes,20,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizeConnectionRequest) Descriptor deprecated

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

Deprecated: Use AuthorizeConnectionRequest.ProtoReflect.Descriptor instead.

func (*AuthorizeConnectionRequest) GetSessionId

func (x *AuthorizeConnectionRequest) GetSessionId() string

func (*AuthorizeConnectionRequest) GetWorkerId added in v0.2.2

func (x *AuthorizeConnectionRequest) GetWorkerId() string

func (*AuthorizeConnectionRequest) ProtoMessage

func (*AuthorizeConnectionRequest) ProtoMessage()

func (*AuthorizeConnectionRequest) ProtoReflect

func (*AuthorizeConnectionRequest) Reset

func (x *AuthorizeConnectionRequest) Reset()

func (*AuthorizeConnectionRequest) String

func (x *AuthorizeConnectionRequest) String() string

type AuthorizeConnectionResponse

type AuthorizeConnectionResponse struct {
	ConnectionId    string           `protobuf:"bytes,10,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	Status          CONNECTIONSTATUS `protobuf:"varint,20,opt,name=status,proto3,enum=controller.servers.services.v1.CONNECTIONSTATUS" json:"status,omitempty"`
	ConnectionsLeft int32            `protobuf:"varint,30,opt,name=connections_left,json=connectionsLeft,proto3" json:"connections_left,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizeConnectionResponse) Descriptor deprecated

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

Deprecated: Use AuthorizeConnectionResponse.ProtoReflect.Descriptor instead.

func (*AuthorizeConnectionResponse) GetConnectionId

func (x *AuthorizeConnectionResponse) GetConnectionId() string

func (*AuthorizeConnectionResponse) GetConnectionsLeft

func (x *AuthorizeConnectionResponse) GetConnectionsLeft() int32

func (*AuthorizeConnectionResponse) GetStatus

func (*AuthorizeConnectionResponse) ProtoMessage

func (*AuthorizeConnectionResponse) ProtoMessage()

func (*AuthorizeConnectionResponse) ProtoReflect

func (*AuthorizeConnectionResponse) Reset

func (x *AuthorizeConnectionResponse) Reset()

func (*AuthorizeConnectionResponse) String

func (x *AuthorizeConnectionResponse) String() string

type CHANGETYPE

type CHANGETYPE int32
const (
	CHANGETYPE_CHANGETYPE_UNSPECIFIED CHANGETYPE = 0
	// Indicates to the worker to update its knowledge of the state, which may
	// cause action to be taken.
	CHANGETYPE_CHANGETYPE_UPDATE_STATE CHANGETYPE = 1
)

func (CHANGETYPE) Descriptor

func (CHANGETYPE) Descriptor() protoreflect.EnumDescriptor

func (CHANGETYPE) Enum

func (x CHANGETYPE) Enum() *CHANGETYPE

func (CHANGETYPE) EnumDescriptor deprecated

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

Deprecated: Use CHANGETYPE.Descriptor instead.

func (CHANGETYPE) Number

func (x CHANGETYPE) Number() protoreflect.EnumNumber

func (CHANGETYPE) String

func (x CHANGETYPE) String() string

func (CHANGETYPE) Type

type CONNECTIONSTATUS

type CONNECTIONSTATUS int32
const (
	CONNECTIONSTATUS_CONNECTIONSTATUS_UNSPECIFIED CONNECTIONSTATUS = 0
	CONNECTIONSTATUS_CONNECTIONSTATUS_AUTHORIZED  CONNECTIONSTATUS = 1
	CONNECTIONSTATUS_CONNECTIONSTATUS_CONNECTED   CONNECTIONSTATUS = 2
	CONNECTIONSTATUS_CONNECTIONSTATUS_CLOSED      CONNECTIONSTATUS = 3
)

func (CONNECTIONSTATUS) Descriptor

func (CONNECTIONSTATUS) Enum

func (CONNECTIONSTATUS) EnumDescriptor deprecated

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

Deprecated: Use CONNECTIONSTATUS.Descriptor instead.

func (CONNECTIONSTATUS) Number

func (CONNECTIONSTATUS) String

func (x CONNECTIONSTATUS) String() string

func (CONNECTIONSTATUS) Type

type CancelSessionRequest added in v0.1.3

type CancelSessionRequest struct {
	SessionId string `protobuf:"bytes,10,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelSessionRequest) Descriptor deprecated added in v0.1.3

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

Deprecated: Use CancelSessionRequest.ProtoReflect.Descriptor instead.

func (*CancelSessionRequest) GetSessionId added in v0.1.3

func (x *CancelSessionRequest) GetSessionId() string

func (*CancelSessionRequest) ProtoMessage added in v0.1.3

func (*CancelSessionRequest) ProtoMessage()

func (*CancelSessionRequest) ProtoReflect added in v0.1.3

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

func (*CancelSessionRequest) Reset added in v0.1.3

func (x *CancelSessionRequest) Reset()

func (*CancelSessionRequest) String added in v0.1.3

func (x *CancelSessionRequest) String() string

type CancelSessionResponse added in v0.1.3

type CancelSessionResponse struct {
	Status SESSIONSTATUS `protobuf:"varint,10,opt,name=status,proto3,enum=controller.servers.services.v1.SESSIONSTATUS" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelSessionResponse) Descriptor deprecated added in v0.1.3

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

Deprecated: Use CancelSessionResponse.ProtoReflect.Descriptor instead.

func (*CancelSessionResponse) GetStatus added in v0.1.3

func (x *CancelSessionResponse) GetStatus() SESSIONSTATUS

func (*CancelSessionResponse) ProtoMessage added in v0.1.3

func (*CancelSessionResponse) ProtoMessage()

func (*CancelSessionResponse) ProtoReflect added in v0.1.3

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

func (*CancelSessionResponse) Reset added in v0.1.3

func (x *CancelSessionResponse) Reset()

func (*CancelSessionResponse) String added in v0.1.3

func (x *CancelSessionResponse) String() string

type CloseConnectionRequest

type CloseConnectionRequest struct {
	CloseRequestData []*CloseConnectionRequestData `protobuf:"bytes,10,rep,name=close_request_data,json=closeRequestData,proto3" json:"close_request_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseConnectionRequest) Descriptor deprecated

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

Deprecated: Use CloseConnectionRequest.ProtoReflect.Descriptor instead.

func (*CloseConnectionRequest) GetCloseRequestData

func (x *CloseConnectionRequest) GetCloseRequestData() []*CloseConnectionRequestData

func (*CloseConnectionRequest) ProtoMessage

func (*CloseConnectionRequest) ProtoMessage()

func (*CloseConnectionRequest) ProtoReflect

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

func (*CloseConnectionRequest) Reset

func (x *CloseConnectionRequest) Reset()

func (*CloseConnectionRequest) String

func (x *CloseConnectionRequest) String() string

type CloseConnectionRequestData

type CloseConnectionRequestData struct {
	ConnectionId string `protobuf:"bytes,10,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	BytesUp      uint64 `protobuf:"varint,20,opt,name=bytes_up,json=bytesUp,proto3" json:"bytes_up,omitempty"`
	BytesDown    uint64 `protobuf:"varint,30,opt,name=bytes_down,json=bytesDown,proto3" json:"bytes_down,omitempty"`
	Reason       string `protobuf:"bytes,40,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseConnectionRequestData) Descriptor deprecated

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

Deprecated: Use CloseConnectionRequestData.ProtoReflect.Descriptor instead.

func (*CloseConnectionRequestData) GetBytesDown

func (x *CloseConnectionRequestData) GetBytesDown() uint64

func (*CloseConnectionRequestData) GetBytesUp

func (x *CloseConnectionRequestData) GetBytesUp() uint64

func (*CloseConnectionRequestData) GetConnectionId

func (x *CloseConnectionRequestData) GetConnectionId() string

func (*CloseConnectionRequestData) GetReason

func (x *CloseConnectionRequestData) GetReason() string

func (*CloseConnectionRequestData) ProtoMessage

func (*CloseConnectionRequestData) ProtoMessage()

func (*CloseConnectionRequestData) ProtoReflect

func (*CloseConnectionRequestData) Reset

func (x *CloseConnectionRequestData) Reset()

func (*CloseConnectionRequestData) String

func (x *CloseConnectionRequestData) String() string

type CloseConnectionResponse

type CloseConnectionResponse struct {
	CloseResponseData []*CloseConnectionResponseData `protobuf:"bytes,10,rep,name=close_response_data,json=closeResponseData,proto3" json:"close_response_data,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseConnectionResponse) Descriptor deprecated

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

Deprecated: Use CloseConnectionResponse.ProtoReflect.Descriptor instead.

func (*CloseConnectionResponse) GetCloseResponseData

func (x *CloseConnectionResponse) GetCloseResponseData() []*CloseConnectionResponseData

func (*CloseConnectionResponse) ProtoMessage

func (*CloseConnectionResponse) ProtoMessage()

func (*CloseConnectionResponse) ProtoReflect

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

func (*CloseConnectionResponse) Reset

func (x *CloseConnectionResponse) Reset()

func (*CloseConnectionResponse) String

func (x *CloseConnectionResponse) String() string

type CloseConnectionResponseData

type CloseConnectionResponseData struct {
	ConnectionId string           `protobuf:"bytes,10,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	Status       CONNECTIONSTATUS `protobuf:"varint,20,opt,name=status,proto3,enum=controller.servers.services.v1.CONNECTIONSTATUS" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CloseConnectionResponseData) Descriptor deprecated

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

Deprecated: Use CloseConnectionResponseData.ProtoReflect.Descriptor instead.

func (*CloseConnectionResponseData) GetConnectionId

func (x *CloseConnectionResponseData) GetConnectionId() string

func (*CloseConnectionResponseData) GetStatus

func (*CloseConnectionResponseData) ProtoMessage

func (*CloseConnectionResponseData) ProtoMessage()

func (*CloseConnectionResponseData) ProtoReflect

func (*CloseConnectionResponseData) Reset

func (x *CloseConnectionResponseData) Reset()

func (*CloseConnectionResponseData) String

func (x *CloseConnectionResponseData) String() string

type ConnectConnectionRequest

type ConnectConnectionRequest struct {
	ConnectionId       string `protobuf:"bytes,10,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	ClientTcpAddress   string `protobuf:"bytes,20,opt,name=client_tcp_address,json=clientTcpAddress,proto3" json:"client_tcp_address,omitempty"`
	ClientTcpPort      uint32 `protobuf:"varint,30,opt,name=client_tcp_port,json=clientTcpPort,proto3" json:"client_tcp_port,omitempty"`
	EndpointTcpAddress string `protobuf:"bytes,40,opt,name=endpoint_tcp_address,json=endpointTcpAddress,proto3" json:"endpoint_tcp_address,omitempty"`
	EndpointTcpPort    uint32 `protobuf:"varint,50,opt,name=endpoint_tcp_port,json=endpointTcpPort,proto3" json:"endpoint_tcp_port,omitempty"`
	Type               string `protobuf:"bytes,60,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectConnectionRequest) Descriptor deprecated

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

Deprecated: Use ConnectConnectionRequest.ProtoReflect.Descriptor instead.

func (*ConnectConnectionRequest) GetClientTcpAddress

func (x *ConnectConnectionRequest) GetClientTcpAddress() string

func (*ConnectConnectionRequest) GetClientTcpPort

func (x *ConnectConnectionRequest) GetClientTcpPort() uint32

func (*ConnectConnectionRequest) GetConnectionId

func (x *ConnectConnectionRequest) GetConnectionId() string

func (*ConnectConnectionRequest) GetEndpointTcpAddress

func (x *ConnectConnectionRequest) GetEndpointTcpAddress() string

func (*ConnectConnectionRequest) GetEndpointTcpPort

func (x *ConnectConnectionRequest) GetEndpointTcpPort() uint32

func (*ConnectConnectionRequest) GetType

func (x *ConnectConnectionRequest) GetType() string

func (*ConnectConnectionRequest) ProtoMessage

func (*ConnectConnectionRequest) ProtoMessage()

func (*ConnectConnectionRequest) ProtoReflect

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

func (*ConnectConnectionRequest) Reset

func (x *ConnectConnectionRequest) Reset()

func (*ConnectConnectionRequest) String

func (x *ConnectConnectionRequest) String() string

type ConnectConnectionResponse

type ConnectConnectionResponse struct {
	Status CONNECTIONSTATUS `protobuf:"varint,10,opt,name=status,proto3,enum=controller.servers.services.v1.CONNECTIONSTATUS" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectConnectionResponse) Descriptor deprecated

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

Deprecated: Use ConnectConnectionResponse.ProtoReflect.Descriptor instead.

func (*ConnectConnectionResponse) GetStatus

func (*ConnectConnectionResponse) ProtoMessage

func (*ConnectConnectionResponse) ProtoMessage()

func (*ConnectConnectionResponse) ProtoReflect

func (*ConnectConnectionResponse) Reset

func (x *ConnectConnectionResponse) Reset()

func (*ConnectConnectionResponse) String

func (x *ConnectConnectionResponse) String() string

type Connection

type Connection struct {
	ConnectionId string           `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	Status       CONNECTIONSTATUS `protobuf:"varint,2,opt,name=status,proto3,enum=controller.servers.services.v1.CONNECTIONSTATUS" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*Connection) Descriptor deprecated

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

Deprecated: Use Connection.ProtoReflect.Descriptor instead.

func (*Connection) GetConnectionId

func (x *Connection) GetConnectionId() string

func (*Connection) GetStatus

func (x *Connection) GetStatus() CONNECTIONSTATUS

func (*Connection) ProtoMessage

func (*Connection) ProtoMessage()

func (*Connection) ProtoReflect

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

func (*Connection) Reset

func (x *Connection) Reset()

func (*Connection) String

func (x *Connection) String() string

type JOBTYPE

type JOBTYPE int32
const (
	JOBTYPE_JOBTYPE_UNSPECIFIED JOBTYPE = 0
	JOBTYPE_JOBTYPE_SESSION     JOBTYPE = 1
)

func (JOBTYPE) Descriptor

func (JOBTYPE) Descriptor() protoreflect.EnumDescriptor

func (JOBTYPE) Enum

func (x JOBTYPE) Enum() *JOBTYPE

func (JOBTYPE) EnumDescriptor deprecated

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

Deprecated: Use JOBTYPE.Descriptor instead.

func (JOBTYPE) Number

func (x JOBTYPE) Number() protoreflect.EnumNumber

func (JOBTYPE) String

func (x JOBTYPE) String() string

func (JOBTYPE) Type

func (JOBTYPE) Type() protoreflect.EnumType

type Job

type Job struct {
	Type JOBTYPE `protobuf:"varint,1,opt,name=type,proto3,enum=controller.servers.services.v1.JOBTYPE" json:"type,omitempty"`
	// Types that are assignable to JobInfo:
	//	*Job_SessionInfo
	JobInfo isJob_JobInfo `protobuf_oneof:"job_info"`
	// contains filtered or unexported fields
}

func (*Job) Descriptor deprecated

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

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetJobInfo

func (m *Job) GetJobInfo() isJob_JobInfo

func (*Job) GetSessionInfo

func (x *Job) GetSessionInfo() *SessionJobInfo

func (*Job) GetType

func (x *Job) GetType() JOBTYPE

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) ProtoReflect

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

func (*Job) Reset

func (x *Job) Reset()

func (*Job) String

func (x *Job) String() string

type JobChangeRequest

type JobChangeRequest struct {
	Job         *Job       `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"`
	RequestType CHANGETYPE `` /* 142-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*JobChangeRequest) Descriptor deprecated

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

Deprecated: Use JobChangeRequest.ProtoReflect.Descriptor instead.

func (*JobChangeRequest) GetJob

func (x *JobChangeRequest) GetJob() *Job

func (*JobChangeRequest) GetRequestType

func (x *JobChangeRequest) GetRequestType() CHANGETYPE

func (*JobChangeRequest) ProtoMessage

func (*JobChangeRequest) ProtoMessage()

func (*JobChangeRequest) ProtoReflect

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

func (*JobChangeRequest) Reset

func (x *JobChangeRequest) Reset()

func (*JobChangeRequest) String

func (x *JobChangeRequest) String() string

type JobStatus

type JobStatus struct {
	Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"`
	// contains filtered or unexported fields
}

func (*JobStatus) Descriptor deprecated

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

Deprecated: Use JobStatus.ProtoReflect.Descriptor instead.

func (*JobStatus) GetJob

func (x *JobStatus) GetJob() *Job

func (*JobStatus) ProtoMessage

func (*JobStatus) ProtoMessage()

func (*JobStatus) ProtoReflect

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

func (*JobStatus) Reset

func (x *JobStatus) Reset()

func (*JobStatus) String

func (x *JobStatus) String() string

type Job_SessionInfo

type Job_SessionInfo struct {
	// This value is specified when type is JOBTYPE_SESSION.
	SessionInfo *SessionJobInfo `protobuf:"bytes,2,opt,name=session_info,json=sessionInfo,proto3,oneof"`
}

type LookupSessionRequest

type LookupSessionRequest struct {

	// The session ID from the client
	SessionId string `protobuf:"bytes,10,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// The name of the requesting worker, used for filtering to ensure this
	// worker is allowed to handle this session.
	ServerId string `protobuf:"bytes,20,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// contains filtered or unexported fields
}

func (*LookupSessionRequest) Descriptor deprecated

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

Deprecated: Use LookupSessionRequest.ProtoReflect.Descriptor instead.

func (*LookupSessionRequest) GetServerId added in v0.1.5

func (x *LookupSessionRequest) GetServerId() string

func (*LookupSessionRequest) GetSessionId

func (x *LookupSessionRequest) GetSessionId() string

func (*LookupSessionRequest) ProtoMessage

func (*LookupSessionRequest) ProtoMessage()

func (*LookupSessionRequest) ProtoReflect

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

func (*LookupSessionRequest) Reset

func (x *LookupSessionRequest) Reset()

func (*LookupSessionRequest) String

func (x *LookupSessionRequest) String() string

type LookupSessionResponse

type LookupSessionResponse struct {
	Authorization   *targets.SessionAuthorizationData `protobuf:"bytes,10,opt,name=authorization,proto3" json:"authorization,omitempty"`
	TofuToken       string                            `protobuf:"bytes,20,opt,name=tofu_token,json=tofuToken,proto3" json:"tofu_token,omitempty"`
	Version         uint32                            `protobuf:"varint,30,opt,name=version,proto3" json:"version,omitempty"`
	Endpoint        string                            `protobuf:"bytes,40,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Expiration      *timestamppb.Timestamp            `protobuf:"bytes,50,opt,name=expiration,proto3" json:"expiration,omitempty"`
	Status          SESSIONSTATUS                     `protobuf:"varint,60,opt,name=status,proto3,enum=controller.servers.services.v1.SESSIONSTATUS" json:"status,omitempty"`
	ConnectionLimit int32                             `protobuf:"varint,70,opt,name=connection_limit,json=connectionLimit,proto3" json:"connection_limit,omitempty"`
	ConnectionsLeft int32                             `protobuf:"varint,80,opt,name=connections_left,json=connectionsLeft,proto3" json:"connections_left,omitempty"`
	HostId          string                            `protobuf:"bytes,90,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"`
	HostSetId       string                            `protobuf:"bytes,100,opt,name=host_set_id,json=hostSetId,proto3" json:"host_set_id,omitempty"`
	TargetId        string                            `protobuf:"bytes,110,opt,name=target_id,json=targetId,proto3" json:"target_id,omitempty"`
	UserId          string                            `protobuf:"bytes,120,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

LookupSessionResponse contains information necessary for a client to establish a session.

func (*LookupSessionResponse) Descriptor deprecated

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

Deprecated: Use LookupSessionResponse.ProtoReflect.Descriptor instead.

func (*LookupSessionResponse) GetAuthorization

func (*LookupSessionResponse) GetConnectionLimit

func (x *LookupSessionResponse) GetConnectionLimit() int32

func (*LookupSessionResponse) GetConnectionsLeft

func (x *LookupSessionResponse) GetConnectionsLeft() int32

func (*LookupSessionResponse) GetEndpoint

func (x *LookupSessionResponse) GetEndpoint() string

func (*LookupSessionResponse) GetExpiration

func (x *LookupSessionResponse) GetExpiration() *timestamppb.Timestamp

func (*LookupSessionResponse) GetHostId

func (x *LookupSessionResponse) GetHostId() string

func (*LookupSessionResponse) GetHostSetId

func (x *LookupSessionResponse) GetHostSetId() string

func (*LookupSessionResponse) GetStatus

func (x *LookupSessionResponse) GetStatus() SESSIONSTATUS

func (*LookupSessionResponse) GetTargetId

func (x *LookupSessionResponse) GetTargetId() string

func (*LookupSessionResponse) GetTofuToken

func (x *LookupSessionResponse) GetTofuToken() string

func (*LookupSessionResponse) GetUserId

func (x *LookupSessionResponse) GetUserId() string

func (*LookupSessionResponse) GetVersion

func (x *LookupSessionResponse) GetVersion() uint32

func (*LookupSessionResponse) ProtoMessage

func (*LookupSessionResponse) ProtoMessage()

func (*LookupSessionResponse) ProtoReflect

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

func (*LookupSessionResponse) Reset

func (x *LookupSessionResponse) Reset()

func (*LookupSessionResponse) String

func (x *LookupSessionResponse) String() string

type SESSIONSTATUS

type SESSIONSTATUS int32
const (
	SESSIONSTATUS_SESSIONSTATUS_UNSPECIFIED SESSIONSTATUS = 0
	SESSIONSTATUS_SESSIONSTATUS_PENDING     SESSIONSTATUS = 1
	SESSIONSTATUS_SESSIONSTATUS_ACTIVE      SESSIONSTATUS = 2
	SESSIONSTATUS_SESSIONSTATUS_CANCELING   SESSIONSTATUS = 3
	SESSIONSTATUS_SESSIONSTATUS_TERMINATED  SESSIONSTATUS = 4
)

func (SESSIONSTATUS) Descriptor

func (SESSIONSTATUS) Enum

func (x SESSIONSTATUS) Enum() *SESSIONSTATUS

func (SESSIONSTATUS) EnumDescriptor deprecated

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

Deprecated: Use SESSIONSTATUS.Descriptor instead.

func (SESSIONSTATUS) Number

func (SESSIONSTATUS) String

func (x SESSIONSTATUS) String() string

func (SESSIONSTATUS) Type

type ServerCoordinationServiceClient

type ServerCoordinationServiceClient interface {
	// Status gets worker status requests which include the ongoing jobs the worker is handling and
	// returns the status response which includes the changes the controller would like to make to
	// jobs as well as provide a list of the controllers in the system.
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}

ServerCoordinationServiceClient is the client API for ServerCoordinationService 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 ServerCoordinationServiceServer

type ServerCoordinationServiceServer interface {
	// Status gets worker status requests which include the ongoing jobs the worker is handling and
	// returns the status response which includes the changes the controller would like to make to
	// jobs as well as provide a list of the controllers in the system.
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	// contains filtered or unexported methods
}

ServerCoordinationServiceServer is the server API for ServerCoordinationService service. All implementations must embed UnimplementedServerCoordinationServiceServer for forward compatibility

type SessionJobInfo

type SessionJobInfo struct {
	SessionId   string        `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Status      SESSIONSTATUS `protobuf:"varint,2,opt,name=status,proto3,enum=controller.servers.services.v1.SESSIONSTATUS" json:"status,omitempty"`
	Connections []*Connection `protobuf:"bytes,3,rep,name=connections,proto3" json:"connections,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionJobInfo) Descriptor deprecated

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

Deprecated: Use SessionJobInfo.ProtoReflect.Descriptor instead.

func (*SessionJobInfo) GetConnections

func (x *SessionJobInfo) GetConnections() []*Connection

func (*SessionJobInfo) GetSessionId

func (x *SessionJobInfo) GetSessionId() string

func (*SessionJobInfo) GetStatus

func (x *SessionJobInfo) GetStatus() SESSIONSTATUS

func (*SessionJobInfo) ProtoMessage

func (*SessionJobInfo) ProtoMessage()

func (*SessionJobInfo) ProtoReflect

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

func (*SessionJobInfo) Reset

func (x *SessionJobInfo) Reset()

func (*SessionJobInfo) String

func (x *SessionJobInfo) String() string

type SessionServiceClient

type SessionServiceClient interface {
	// GetSession allows a worker to retrieve session information from the
	// controller.
	LookupSession(ctx context.Context, in *LookupSessionRequest, opts ...grpc.CallOption) (*LookupSessionResponse, error)
	// ActivateSession allows a worker to activate a session on a controller.
	ActivateSession(ctx context.Context, in *ActivateSessionRequest, opts ...grpc.CallOption) (*ActivateSessionResponse, error)
	// CancelSession allows a worker to request that the controller cancel a session.
	CancelSession(ctx context.Context, in *CancelSessionRequest, opts ...grpc.CallOption) (*CancelSessionResponse, error)
	// AuthorizeConnection allows a worker to activate a session on a controller.
	AuthorizeConnection(ctx context.Context, in *AuthorizeConnectionRequest, opts ...grpc.CallOption) (*AuthorizeConnectionResponse, error)
	// ConnectConnection updates a connection to set it to connected
	ConnectConnection(ctx context.Context, in *ConnectConnectionRequest, opts ...grpc.CallOption) (*ConnectConnectionResponse, error)
	// CloseConnections updates a connection to set it to closed
	CloseConnection(ctx context.Context, in *CloseConnectionRequest, opts ...grpc.CallOption) (*CloseConnectionResponse, error)
}

SessionServiceClient is the client API for SessionService 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 SessionServiceServer

type SessionServiceServer interface {
	// GetSession allows a worker to retrieve session information from the
	// controller.
	LookupSession(context.Context, *LookupSessionRequest) (*LookupSessionResponse, error)
	// ActivateSession allows a worker to activate a session on a controller.
	ActivateSession(context.Context, *ActivateSessionRequest) (*ActivateSessionResponse, error)
	// CancelSession allows a worker to request that the controller cancel a session.
	CancelSession(context.Context, *CancelSessionRequest) (*CancelSessionResponse, error)
	// AuthorizeConnection allows a worker to activate a session on a controller.
	AuthorizeConnection(context.Context, *AuthorizeConnectionRequest) (*AuthorizeConnectionResponse, error)
	// ConnectConnection updates a connection to set it to connected
	ConnectConnection(context.Context, *ConnectConnectionRequest) (*ConnectConnectionResponse, error)
	// CloseConnections updates a connection to set it to closed
	CloseConnection(context.Context, *CloseConnectionRequest) (*CloseConnectionResponse, error)
	// contains filtered or unexported methods
}

SessionServiceServer is the server API for SessionService service. All implementations must embed UnimplementedSessionServiceServer for forward compatibility

type StatusRequest

type StatusRequest struct {

	// The worker info. We could use information from the TLS connection but this
	// is easier and going the other route doesn't provijde much benefit -- if you
	// get access to the key and spoof the connection, you're already compromised.
	Worker *servers.Server `protobuf:"bytes,10,opt,name=worker,proto3" json:"worker,omitempty"`
	// Jobs which this worker wants to report the status.
	Jobs []*JobStatus `protobuf:"bytes,20,rep,name=jobs,proto3" json:"jobs,omitempty"`
	// Whether to update tags from the Server block on this RPC. We only need to
	// do this at startup or (at some point) SIGHUP, so specifying when it's
	// changed allows us to avoid constant database operations for something that
	// won't change very often, if ever.
	UpdateTags bool `protobuf:"varint,30,opt,name=update_tags,json=updateTags,proto3" json:"update_tags,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) GetJobs

func (x *StatusRequest) GetJobs() []*JobStatus

func (*StatusRequest) GetUpdateTags added in v0.1.5

func (x *StatusRequest) GetUpdateTags() bool

func (*StatusRequest) GetWorker

func (x *StatusRequest) GetWorker() *servers.Server

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {

	// Active controllers. This can be used (eventually) for connection
	// management.
	Controllers []*servers.Server `protobuf:"bytes,10,rep,name=controllers,proto3" json:"controllers,omitempty"`
	// List of jobs and the expected state changes.  For example, this will
	// include jobs witch change type of canceled for jobs which are active on a
	// worker but should be canceled. This could also contain a request to start a
	// job such as a worker -> worker proxy for establishing a session through an
	// enclave.
	JobsRequests []*JobChangeRequest `protobuf:"bytes,20,rep,name=jobs_requests,json=jobsRequests,proto3" json:"jobs_requests,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetControllers

func (x *StatusResponse) GetControllers() []*servers.Server

func (*StatusResponse) GetJobsRequests

func (x *StatusResponse) GetJobsRequests() []*JobChangeRequest

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type UnimplementedServerCoordinationServiceServer

type UnimplementedServerCoordinationServiceServer struct {
}

UnimplementedServerCoordinationServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServerCoordinationServiceServer) Status

type UnimplementedSessionServiceServer

type UnimplementedSessionServiceServer struct {
}

UnimplementedSessionServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSessionServiceServer) ActivateSession

func (UnimplementedSessionServiceServer) AuthorizeConnection

func (UnimplementedSessionServiceServer) CancelSession added in v0.1.3

func (UnimplementedSessionServiceServer) CloseConnection

func (UnimplementedSessionServiceServer) ConnectConnection

func (UnimplementedSessionServiceServer) LookupSession

type UnsafeServerCoordinationServiceServer added in v0.1.2

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

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

type UnsafeSessionServiceServer added in v0.1.2

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

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

Jump to

Keyboard shortcuts

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