Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterTunnelServer(s grpc.ServiceRegistrar, srv TunnelServer)
- type AppendSetupLogsRequest
- func (*AppendSetupLogsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AppendSetupLogsRequest) GetFirstSequence() uint64
- func (x *AppendSetupLogsRequest) GetLastSequence() uint64
- func (x *AppendSetupLogsRequest) GetProducerId() string
- func (x *AppendSetupLogsRequest) GetRecords() [][]byte
- func (x *AppendSetupLogsRequest) GetRunId() string
- func (x *AppendSetupLogsRequest) GetSchemaVersion() uint32
- func (*AppendSetupLogsRequest) ProtoMessage()
- func (x *AppendSetupLogsRequest) ProtoReflect() protoreflect.Message
- func (x *AppendSetupLogsRequest) Reset()
- func (x *AppendSetupLogsRequest) String() string
- type AppendSetupLogsResponse
- func (*AppendSetupLogsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AppendSetupLogsResponse) GetAcceptedSequence() uint64
- func (x *AppendSetupLogsResponse) GetDetail() string
- func (x *AppendSetupLogsResponse) GetGapFirstSequence() uint64
- func (x *AppendSetupLogsResponse) GetGapLastSequence() uint64
- func (x *AppendSetupLogsResponse) GetResult() SetupLogResult
- func (*AppendSetupLogsResponse) ProtoMessage()
- func (x *AppendSetupLogsResponse) ProtoReflect() protoreflect.Message
- func (x *AppendSetupLogsResponse) Reset()
- func (x *AppendSetupLogsResponse) String() string
- type Chunk
- type Empty
- type ForwardPortRequest
- func (*ForwardPortRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardPortRequest) GetPort() string
- func (*ForwardPortRequest) ProtoMessage()
- func (x *ForwardPortRequest) ProtoReflect() protoreflect.Message
- func (x *ForwardPortRequest) Reset()
- func (x *ForwardPortRequest) String() string
- type ForwardPortResponse
- type LogLevel
- type LogMessage
- type Message
- type Secret
- type SecretsResponse
- type SetupLogForwarder
- type SetupLogForwarderOptions
- type SetupLogResult
- func (SetupLogResult) Descriptor() protoreflect.EnumDescriptor
- func (x SetupLogResult) Enum() *SetupLogResult
- func (SetupLogResult) EnumDescriptor() ([]byte, []int)deprecated
- func (x SetupLogResult) Number() protoreflect.EnumNumber
- func (x SetupLogResult) String() string
- func (SetupLogResult) Type() protoreflect.EnumType
- type SetupLogSender
- type SetupLogSenderOptions
- type SetupLogSource
- type StatusError
- func (*StatusError) Descriptor() ([]byte, []int)deprecated
- func (x *StatusError) GetCode() string
- func (x *StatusError) GetContext() map[string]string
- func (x *StatusError) GetHint() string
- func (x *StatusError) GetMessage() string
- func (*StatusError) ProtoMessage()
- func (x *StatusError) ProtoReflect() protoreflect.Message
- func (x *StatusError) Reset()
- func (x *StatusError) String() string
- type StatusUpdate
- func (*StatusUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *StatusUpdate) GetDurationMs() int64
- func (x *StatusUpdate) GetError() *StatusError
- func (x *StatusUpdate) GetOperationId() string
- func (x *StatusUpdate) GetParentOperationId() string
- func (x *StatusUpdate) GetPhase() string
- func (x *StatusUpdate) GetState() string
- func (x *StatusUpdate) GetStep() string
- func (*StatusUpdate) ProtoMessage()
- func (x *StatusUpdate) ProtoReflect() protoreflect.Message
- func (x *StatusUpdate) Reset()
- func (x *StatusUpdate) String() string
- type StopForwardPortRequest
- func (*StopForwardPortRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StopForwardPortRequest) GetPort() string
- func (*StopForwardPortRequest) ProtoMessage()
- func (x *StopForwardPortRequest) ProtoReflect() protoreflect.Message
- func (x *StopForwardPortRequest) Reset()
- func (x *StopForwardPortRequest) String() string
- type StopForwardPortResponse
- type StreamMountRequest
- func (*StreamMountRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamMountRequest) GetMount() string
- func (*StreamMountRequest) ProtoMessage()
- func (x *StreamMountRequest) ProtoReflect() protoreflect.Message
- func (x *StreamMountRequest) Reset()
- func (x *StreamMountRequest) String() string
- type TunnelClient
- type TunnelServer
- type Tunnel_StreamMountClient
- type Tunnel_StreamMountServer
- type Tunnel_StreamSnapshotVolumesClient
- type Tunnel_StreamSnapshotVolumesServer
- type Tunnel_StreamWorkspaceClient
- type Tunnel_StreamWorkspaceServer
- type UnimplementedTunnelServer
- func (UnimplementedTunnelServer) AppendSetupLogs(context.Context, *AppendSetupLogsRequest) (*AppendSetupLogsResponse, error)
- func (UnimplementedTunnelServer) DevsyConfig(context.Context, *Message) (*Message, error)
- func (UnimplementedTunnelServer) DockerCredentials(context.Context, *Message) (*Message, error)
- func (UnimplementedTunnelServer) ForwardPort(context.Context, *ForwardPortRequest) (*ForwardPortResponse, error)
- func (UnimplementedTunnelServer) GPGPublicKeys(context.Context, *Message) (*Message, error)
- func (UnimplementedTunnelServer) GitCredentials(context.Context, *Message) (*Message, error)
- func (UnimplementedTunnelServer) GitHubCredentials(context.Context, *Empty) (*Message, error)
- func (UnimplementedTunnelServer) GitSSHSignature(context.Context, *Message) (*Message, error)
- func (UnimplementedTunnelServer) GitUser(context.Context, *Empty) (*Message, error)
- func (UnimplementedTunnelServer) KubeConfig(context.Context, *Message) (*Message, error)
- func (UnimplementedTunnelServer) Log(context.Context, *LogMessage) (*Empty, error)
- func (UnimplementedTunnelServer) Ping(context.Context, *Empty) (*Empty, error)
- func (UnimplementedTunnelServer) Secrets(context.Context, *Empty) (*SecretsResponse, error)
- func (UnimplementedTunnelServer) SendResult(context.Context, *Message) (*Empty, error)
- func (UnimplementedTunnelServer) Status(context.Context, *StatusUpdate) (*Empty, error)
- func (UnimplementedTunnelServer) StopForwardPort(context.Context, *StopForwardPortRequest) (*StopForwardPortResponse, error)
- func (UnimplementedTunnelServer) StreamMount(*StreamMountRequest, grpc.ServerStreamingServer[Chunk]) error
- func (UnimplementedTunnelServer) StreamSnapshotVolumes(*Empty, grpc.ServerStreamingServer[Chunk]) error
- func (UnimplementedTunnelServer) StreamWorkspace(*Empty, grpc.ServerStreamingServer[Chunk]) error
- type UnsafeTunnelServer
Constants ¶
const ( Tunnel_Ping_FullMethodName = "/tunnel.Tunnel/Ping" Tunnel_Log_FullMethodName = "/tunnel.Tunnel/Log" Tunnel_Status_FullMethodName = "/tunnel.Tunnel/Status" Tunnel_AppendSetupLogs_FullMethodName = "/tunnel.Tunnel/AppendSetupLogs" Tunnel_SendResult_FullMethodName = "/tunnel.Tunnel/SendResult" Tunnel_DockerCredentials_FullMethodName = "/tunnel.Tunnel/DockerCredentials" Tunnel_GitCredentials_FullMethodName = "/tunnel.Tunnel/GitCredentials" Tunnel_GitHubCredentials_FullMethodName = "/tunnel.Tunnel/GitHubCredentials" Tunnel_GitSSHSignature_FullMethodName = "/tunnel.Tunnel/GitSSHSignature" Tunnel_GitUser_FullMethodName = "/tunnel.Tunnel/GitUser" Tunnel_DevsyConfig_FullMethodName = "/tunnel.Tunnel/DevsyConfig" Tunnel_GPGPublicKeys_FullMethodName = "/tunnel.Tunnel/GPGPublicKeys" Tunnel_KubeConfig_FullMethodName = "/tunnel.Tunnel/KubeConfig" Tunnel_Secrets_FullMethodName = "/tunnel.Tunnel/Secrets" Tunnel_ForwardPort_FullMethodName = "/tunnel.Tunnel/ForwardPort" Tunnel_StopForwardPort_FullMethodName = "/tunnel.Tunnel/StopForwardPort" Tunnel_StreamWorkspace_FullMethodName = "/tunnel.Tunnel/StreamWorkspace" Tunnel_StreamMount_FullMethodName = "/tunnel.Tunnel/StreamMount" Tunnel_StreamSnapshotVolumes_FullMethodName = "/tunnel.Tunnel/StreamSnapshotVolumes" )
Variables ¶
var ( LogLevel_name = map[int32]string{ 0: "DEBUG", 1: "INFO", 2: "DONE", 3: "WARNING", 4: "ERROR", } LogLevel_value = map[string]int32{ "DEBUG": 0, "INFO": 1, "DONE": 2, "WARNING": 3, "ERROR": 4, } )
Enum value maps for LogLevel.
var ( SetupLogResult_name = map[int32]string{ 0: "SETUP_LOG_RESULT_UNSPECIFIED", 1: "SETUP_LOG_RESULT_ACCEPTED", 2: "SETUP_LOG_RESULT_RETENTION_GAP", 3: "SETUP_LOG_RESULT_REJECTED_INVALID", } SetupLogResult_value = map[string]int32{ "SETUP_LOG_RESULT_UNSPECIFIED": 0, "SETUP_LOG_RESULT_ACCEPTED": 1, "SETUP_LOG_RESULT_RETENTION_GAP": 2, "SETUP_LOG_RESULT_REJECTED_INVALID": 3, } )
Enum value maps for SetupLogResult.
var File_tunnel_proto protoreflect.FileDescriptor
var Tunnel_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tunnel.Tunnel", HandlerType: (*TunnelServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Tunnel_Ping_Handler, }, { MethodName: "Log", Handler: _Tunnel_Log_Handler, }, { MethodName: "Status", Handler: _Tunnel_Status_Handler, }, { MethodName: "AppendSetupLogs", Handler: _Tunnel_AppendSetupLogs_Handler, }, { MethodName: "SendResult", Handler: _Tunnel_SendResult_Handler, }, { MethodName: "DockerCredentials", Handler: _Tunnel_DockerCredentials_Handler, }, { MethodName: "GitCredentials", Handler: _Tunnel_GitCredentials_Handler, }, { MethodName: "GitHubCredentials", Handler: _Tunnel_GitHubCredentials_Handler, }, { MethodName: "GitSSHSignature", Handler: _Tunnel_GitSSHSignature_Handler, }, { MethodName: "GitUser", Handler: _Tunnel_GitUser_Handler, }, { MethodName: "DevsyConfig", Handler: _Tunnel_DevsyConfig_Handler, }, { MethodName: "GPGPublicKeys", Handler: _Tunnel_GPGPublicKeys_Handler, }, { MethodName: "KubeConfig", Handler: _Tunnel_KubeConfig_Handler, }, { MethodName: "Secrets", Handler: _Tunnel_Secrets_Handler, }, { MethodName: "ForwardPort", Handler: _Tunnel_ForwardPort_Handler, }, { MethodName: "StopForwardPort", Handler: _Tunnel_StopForwardPort_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamWorkspace", Handler: _Tunnel_StreamWorkspace_Handler, ServerStreams: true, }, { StreamName: "StreamMount", Handler: _Tunnel_StreamMount_Handler, ServerStreams: true, }, { StreamName: "StreamSnapshotVolumes", Handler: _Tunnel_StreamSnapshotVolumes_Handler, ServerStreams: true, }, }, Metadata: "tunnel.proto", }
Tunnel_ServiceDesc is the grpc.ServiceDesc for Tunnel service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTunnelServer ¶
func RegisterTunnelServer(s grpc.ServiceRegistrar, srv TunnelServer)
Types ¶
type AppendSetupLogsRequest ¶
type AppendSetupLogsRequest struct {
SchemaVersion uint32 `protobuf:"varint,1,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`
RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
ProducerId string `protobuf:"bytes,3,opt,name=producer_id,json=producerId,proto3" json:"producer_id,omitempty"`
FirstSequence uint64 `protobuf:"varint,4,opt,name=first_sequence,json=firstSequence,proto3" json:"first_sequence,omitempty"`
LastSequence uint64 `protobuf:"varint,5,opt,name=last_sequence,json=lastSequence,proto3" json:"last_sequence,omitempty"`
Records [][]byte `protobuf:"bytes,6,rep,name=records,proto3" json:"records,omitempty"`
// contains filtered or unexported fields
}
AppendSetupLogsRequest carries one contiguous batch of a producer's records. Each record is a JSON encoded workspacelogs.Record. The encoded request is capped at 256 KiB.
func (*AppendSetupLogsRequest) Descriptor
deprecated
func (*AppendSetupLogsRequest) Descriptor() ([]byte, []int)
Deprecated: Use AppendSetupLogsRequest.ProtoReflect.Descriptor instead.
func (*AppendSetupLogsRequest) GetFirstSequence ¶
func (x *AppendSetupLogsRequest) GetFirstSequence() uint64
func (*AppendSetupLogsRequest) GetLastSequence ¶
func (x *AppendSetupLogsRequest) GetLastSequence() uint64
func (*AppendSetupLogsRequest) GetProducerId ¶
func (x *AppendSetupLogsRequest) GetProducerId() string
func (*AppendSetupLogsRequest) GetRecords ¶
func (x *AppendSetupLogsRequest) GetRecords() [][]byte
func (*AppendSetupLogsRequest) GetRunId ¶
func (x *AppendSetupLogsRequest) GetRunId() string
func (*AppendSetupLogsRequest) GetSchemaVersion ¶
func (x *AppendSetupLogsRequest) GetSchemaVersion() uint32
func (*AppendSetupLogsRequest) ProtoMessage ¶
func (*AppendSetupLogsRequest) ProtoMessage()
func (*AppendSetupLogsRequest) ProtoReflect ¶
func (x *AppendSetupLogsRequest) ProtoReflect() protoreflect.Message
func (*AppendSetupLogsRequest) Reset ¶
func (x *AppendSetupLogsRequest) Reset()
func (*AppendSetupLogsRequest) String ¶
func (x *AppendSetupLogsRequest) String() string
type AppendSetupLogsResponse ¶
type AppendSetupLogsResponse struct {
// Highest contiguous sequence persisted for the producer.
AcceptedSequence uint64 `protobuf:"varint,1,opt,name=accepted_sequence,json=acceptedSequence,proto3" json:"accepted_sequence,omitempty"`
Result SetupLogResult `protobuf:"varint,2,opt,name=result,proto3,enum=tunnel.SetupLogResult" json:"result,omitempty"`
// Sequences the receiver will never hold, set for RETENTION_GAP.
GapFirstSequence uint64 `protobuf:"varint,3,opt,name=gap_first_sequence,json=gapFirstSequence,proto3" json:"gap_first_sequence,omitempty"`
GapLastSequence uint64 `protobuf:"varint,4,opt,name=gap_last_sequence,json=gapLastSequence,proto3" json:"gap_last_sequence,omitempty"`
Detail string `protobuf:"bytes,5,opt,name=detail,proto3" json:"detail,omitempty"`
// contains filtered or unexported fields
}
func (*AppendSetupLogsResponse) Descriptor
deprecated
func (*AppendSetupLogsResponse) Descriptor() ([]byte, []int)
Deprecated: Use AppendSetupLogsResponse.ProtoReflect.Descriptor instead.
func (*AppendSetupLogsResponse) GetAcceptedSequence ¶
func (x *AppendSetupLogsResponse) GetAcceptedSequence() uint64
func (*AppendSetupLogsResponse) GetDetail ¶
func (x *AppendSetupLogsResponse) GetDetail() string
func (*AppendSetupLogsResponse) GetGapFirstSequence ¶
func (x *AppendSetupLogsResponse) GetGapFirstSequence() uint64
func (*AppendSetupLogsResponse) GetGapLastSequence ¶
func (x *AppendSetupLogsResponse) GetGapLastSequence() uint64
func (*AppendSetupLogsResponse) GetResult ¶
func (x *AppendSetupLogsResponse) GetResult() SetupLogResult
func (*AppendSetupLogsResponse) ProtoMessage ¶
func (*AppendSetupLogsResponse) ProtoMessage()
func (*AppendSetupLogsResponse) ProtoReflect ¶
func (x *AppendSetupLogsResponse) ProtoReflect() protoreflect.Message
func (*AppendSetupLogsResponse) Reset ¶
func (x *AppendSetupLogsResponse) Reset()
func (*AppendSetupLogsResponse) String ¶
func (x *AppendSetupLogsResponse) String() string
type Chunk ¶
type Chunk struct {
Content []byte `protobuf:"bytes,1,opt,name=Content,proto3" json:"Content,omitempty"`
// contains filtered or unexported fields
}
func (*Chunk) Descriptor
deprecated
func (*Chunk) GetContent ¶
func (*Chunk) ProtoMessage ¶
func (*Chunk) ProtoMessage()
func (*Chunk) ProtoReflect ¶
func (x *Chunk) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type ForwardPortRequest ¶
type ForwardPortRequest struct {
Port string `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"`
// contains filtered or unexported fields
}
func (*ForwardPortRequest) Descriptor
deprecated
func (*ForwardPortRequest) Descriptor() ([]byte, []int)
Deprecated: Use ForwardPortRequest.ProtoReflect.Descriptor instead.
func (*ForwardPortRequest) GetPort ¶
func (x *ForwardPortRequest) GetPort() string
func (*ForwardPortRequest) ProtoMessage ¶
func (*ForwardPortRequest) ProtoMessage()
func (*ForwardPortRequest) ProtoReflect ¶
func (x *ForwardPortRequest) ProtoReflect() protoreflect.Message
func (*ForwardPortRequest) Reset ¶
func (x *ForwardPortRequest) Reset()
func (*ForwardPortRequest) String ¶
func (x *ForwardPortRequest) String() string
type ForwardPortResponse ¶
type ForwardPortResponse struct {
// contains filtered or unexported fields
}
func (*ForwardPortResponse) Descriptor
deprecated
func (*ForwardPortResponse) Descriptor() ([]byte, []int)
Deprecated: Use ForwardPortResponse.ProtoReflect.Descriptor instead.
func (*ForwardPortResponse) ProtoMessage ¶
func (*ForwardPortResponse) ProtoMessage()
func (*ForwardPortResponse) ProtoReflect ¶
func (x *ForwardPortResponse) ProtoReflect() protoreflect.Message
func (*ForwardPortResponse) Reset ¶
func (x *ForwardPortResponse) Reset()
func (*ForwardPortResponse) String ¶
func (x *ForwardPortResponse) String() string
type LogLevel ¶
type LogLevel int32
func (LogLevel) Descriptor ¶
func (LogLevel) Descriptor() protoreflect.EnumDescriptor
func (LogLevel) EnumDescriptor
deprecated
func (LogLevel) Number ¶
func (x LogLevel) Number() protoreflect.EnumNumber
func (LogLevel) Type ¶
func (LogLevel) Type() protoreflect.EnumType
type LogMessage ¶
type LogMessage struct {
LogLevel LogLevel `protobuf:"varint,1,opt,name=logLevel,proto3,enum=tunnel.LogLevel" json:"logLevel,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*LogMessage) Descriptor
deprecated
func (*LogMessage) Descriptor() ([]byte, []int)
Deprecated: Use LogMessage.ProtoReflect.Descriptor instead.
func (*LogMessage) GetLogLevel ¶
func (x *LogMessage) GetLogLevel() LogLevel
func (*LogMessage) GetMessage ¶
func (x *LogMessage) GetMessage() string
func (*LogMessage) ProtoMessage ¶
func (*LogMessage) ProtoMessage()
func (*LogMessage) ProtoReflect ¶
func (x *LogMessage) ProtoReflect() protoreflect.Message
func (*LogMessage) Reset ¶
func (x *LogMessage) Reset()
func (*LogMessage) String ¶
func (x *LogMessage) String() string
type Message ¶
type Message struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*Message) Descriptor
deprecated
func (*Message) GetMessage ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Secret ¶ added in v1.10.0
type Secret struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Mount bool `protobuf:"varint,3,opt,name=mount,proto3" json:"mount,omitempty"`
// contains filtered or unexported fields
}
func (*Secret) Descriptor
deprecated
added in
v1.10.0
func (*Secret) ProtoMessage ¶ added in v1.10.0
func (*Secret) ProtoMessage()
func (*Secret) ProtoReflect ¶ added in v1.10.0
func (x *Secret) ProtoReflect() protoreflect.Message
type SecretsResponse ¶ added in v1.10.0
type SecretsResponse struct {
Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"`
// contains filtered or unexported fields
}
func (*SecretsResponse) Descriptor
deprecated
added in
v1.10.0
func (*SecretsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SecretsResponse.ProtoReflect.Descriptor instead.
func (*SecretsResponse) GetSecrets ¶ added in v1.10.0
func (x *SecretsResponse) GetSecrets() []*Secret
func (*SecretsResponse) ProtoMessage ¶ added in v1.10.0
func (*SecretsResponse) ProtoMessage()
func (*SecretsResponse) ProtoReflect ¶ added in v1.10.0
func (x *SecretsResponse) ProtoReflect() protoreflect.Message
func (*SecretsResponse) Reset ¶ added in v1.10.0
func (x *SecretsResponse) Reset()
func (*SecretsResponse) String ¶ added in v1.10.0
func (x *SecretsResponse) String() string
type SetupLogForwarder ¶
type SetupLogForwarder struct {
// contains filtered or unexported fields
}
SetupLogForwarder is the intermediate mode for the provider host. It sends the original records received from containers upstream with unchanged run, producer and sequence identity, and tracks the caller's acknowledged position separately from what its own store accepted.
func NewSetupLogForwarder ¶
func NewSetupLogForwarder(ctx context.Context, opts SetupLogForwarderOptions) *SetupLogForwarder
NewSetupLogForwarder returns a forwarder whose senders live until ctx ends or Close is called.
func (*SetupLogForwarder) Flush ¶
func (f *SetupLogForwarder) Flush(ctx context.Context) bool
Flush drains every producer upstream within one cleanup budget and reports whether the caller holds everything the provider holds. A failure at this hop is reported even though the provider's own store accepted the records.
func (*SetupLogForwarder) Notify ¶
func (f *SetupLogForwarder) Notify(producerID string, _ uint64)
Notify is the Sink's OnAccepted hook: records of producerID are now in the local store and can go upstream. It never blocks.
type SetupLogForwarderOptions ¶
type SetupLogForwarderOptions struct {
Client TunnelClient
Source SetupLogSource
RunID string
Acks *workspacelogs.AckStore
// CleanupTimeout bounds one Flush across every producer.
CleanupTimeout time.Duration
CallTimeout time.Duration
PollInterval time.Duration
}
SetupLogForwarderOptions configures a SetupLogForwarder.
type SetupLogResult ¶
type SetupLogResult int32
const ( SetupLogResult_SETUP_LOG_RESULT_UNSPECIFIED SetupLogResult = 0 SetupLogResult_SETUP_LOG_RESULT_ACCEPTED SetupLogResult = 1 SetupLogResult_SETUP_LOG_RESULT_RETENTION_GAP SetupLogResult = 2 SetupLogResult_SETUP_LOG_RESULT_REJECTED_INVALID SetupLogResult = 3 )
func (SetupLogResult) Descriptor ¶
func (SetupLogResult) Descriptor() protoreflect.EnumDescriptor
func (SetupLogResult) Enum ¶
func (x SetupLogResult) Enum() *SetupLogResult
func (SetupLogResult) EnumDescriptor
deprecated
func (SetupLogResult) EnumDescriptor() ([]byte, []int)
Deprecated: Use SetupLogResult.Descriptor instead.
func (SetupLogResult) Number ¶
func (x SetupLogResult) Number() protoreflect.EnumNumber
func (SetupLogResult) String ¶
func (x SetupLogResult) String() string
func (SetupLogResult) Type ¶
func (SetupLogResult) Type() protoreflect.EnumType
type SetupLogSender ¶
type SetupLogSender struct {
// contains filtered or unexported fields
}
SetupLogSender mirrors one producer's records from a source store to the next host. Records stay in the source spool; the sender only remembers how far the peer has acknowledged, so a stalled peer never blocks the producer and never grows memory.
func NewSetupLogSender ¶
func NewSetupLogSender(ctx context.Context, opts SetupLogSenderOptions) *SetupLogSender
NewSetupLogSender starts the background worker. Call Close when done.
func (*SetupLogSender) Acked ¶
func (s *SetupLogSender) Acked() uint64
Acked returns the highest sequence the peer acknowledged.
func (*SetupLogSender) Disabled ¶
func (s *SetupLogSender) Disabled() bool
Disabled reports that the peer cannot take records (older peer or rejected batch). The source spool is intact.
func (*SetupLogSender) Flush ¶
func (s *SetupLogSender) Flush(ctx context.Context) bool
Flush makes a bounded final drain. It always uses its own cleanup deadline, even when ctx is already canceled, and reports whether every retained record was acknowledged without gaps.
func (*SetupLogSender) Notify ¶
func (s *SetupLogSender) Notify()
Notify tells the sender new records are available. It never blocks; wake-ups coalesce into one.
type SetupLogSenderOptions ¶
type SetupLogSenderOptions struct {
Client TunnelClient
Source SetupLogSource
RunID string
ProducerID string
// Acks stores the acknowledged position so a restart resumes from it. When
// nil the position lives in memory only.
Acks *workspacelogs.AckStore
// Hop names the position kept in Acks. Defaults to HopUpstream.
Hop workspacelogs.Hop
// CleanupTimeout bounds Flush. CallTimeout bounds one RPC.
CleanupTimeout time.Duration
CallTimeout time.Duration
PollInterval time.Duration
}
SetupLogSenderOptions configures a SetupLogSender.
type SetupLogSource ¶
type SetupLogSource interface {
ReadAfter(runID, producerID string, after uint64, maxBytes int) ([]workspacelogs.Record, error)
}
SetupLogSource supplies a producer's committed records. See workspacelogs.StoreSource.
type StatusError ¶ added in v1.20.0
type StatusError struct {
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
Hint string `protobuf:"bytes,3,opt,name=hint,proto3" json:"hint,omitempty"`
Context map[string]string `` /* 141-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*StatusError) Descriptor
deprecated
added in
v1.20.0
func (*StatusError) Descriptor() ([]byte, []int)
Deprecated: Use StatusError.ProtoReflect.Descriptor instead.
func (*StatusError) GetCode ¶ added in v1.20.0
func (x *StatusError) GetCode() string
func (*StatusError) GetContext ¶ added in v1.20.0
func (x *StatusError) GetContext() map[string]string
func (*StatusError) GetHint ¶ added in v1.20.0
func (x *StatusError) GetHint() string
func (*StatusError) GetMessage ¶ added in v1.20.0
func (x *StatusError) GetMessage() string
func (*StatusError) ProtoMessage ¶ added in v1.20.0
func (*StatusError) ProtoMessage()
func (*StatusError) ProtoReflect ¶ added in v1.20.0
func (x *StatusError) ProtoReflect() protoreflect.Message
func (*StatusError) Reset ¶ added in v1.20.0
func (x *StatusError) Reset()
func (*StatusError) String ¶ added in v1.20.0
func (x *StatusError) String() string
type StatusUpdate ¶ added in v1.13.0
type StatusUpdate struct {
Phase string `protobuf:"bytes,1,opt,name=phase,proto3" json:"phase,omitempty"`
Step string `protobuf:"bytes,2,opt,name=step,proto3" json:"step,omitempty"`
State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
DurationMs int64 `protobuf:"varint,4,opt,name=duration_ms,json=durationMs,proto3" json:"duration_ms,omitempty"`
OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
ParentOperationId string `protobuf:"bytes,6,opt,name=parent_operation_id,json=parentOperationId,proto3" json:"parent_operation_id,omitempty"`
Error *StatusError `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
func (*StatusUpdate) Descriptor
deprecated
added in
v1.13.0
func (*StatusUpdate) Descriptor() ([]byte, []int)
Deprecated: Use StatusUpdate.ProtoReflect.Descriptor instead.
func (*StatusUpdate) GetDurationMs ¶ added in v1.20.0
func (x *StatusUpdate) GetDurationMs() int64
func (*StatusUpdate) GetError ¶ added in v1.13.0
func (x *StatusUpdate) GetError() *StatusError
func (*StatusUpdate) GetOperationId ¶ added in v1.20.0
func (x *StatusUpdate) GetOperationId() string
func (*StatusUpdate) GetParentOperationId ¶ added in v1.20.0
func (x *StatusUpdate) GetParentOperationId() string
func (*StatusUpdate) GetPhase ¶ added in v1.13.0
func (x *StatusUpdate) GetPhase() string
func (*StatusUpdate) GetState ¶ added in v1.20.0
func (x *StatusUpdate) GetState() string
func (*StatusUpdate) GetStep ¶ added in v1.13.0
func (x *StatusUpdate) GetStep() string
func (*StatusUpdate) ProtoMessage ¶ added in v1.13.0
func (*StatusUpdate) ProtoMessage()
func (*StatusUpdate) ProtoReflect ¶ added in v1.13.0
func (x *StatusUpdate) ProtoReflect() protoreflect.Message
func (*StatusUpdate) Reset ¶ added in v1.13.0
func (x *StatusUpdate) Reset()
func (*StatusUpdate) String ¶ added in v1.13.0
func (x *StatusUpdate) String() string
type StopForwardPortRequest ¶
type StopForwardPortRequest struct {
Port string `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"`
// contains filtered or unexported fields
}
func (*StopForwardPortRequest) Descriptor
deprecated
func (*StopForwardPortRequest) Descriptor() ([]byte, []int)
Deprecated: Use StopForwardPortRequest.ProtoReflect.Descriptor instead.
func (*StopForwardPortRequest) GetPort ¶
func (x *StopForwardPortRequest) GetPort() string
func (*StopForwardPortRequest) ProtoMessage ¶
func (*StopForwardPortRequest) ProtoMessage()
func (*StopForwardPortRequest) ProtoReflect ¶
func (x *StopForwardPortRequest) ProtoReflect() protoreflect.Message
func (*StopForwardPortRequest) Reset ¶
func (x *StopForwardPortRequest) Reset()
func (*StopForwardPortRequest) String ¶
func (x *StopForwardPortRequest) String() string
type StopForwardPortResponse ¶
type StopForwardPortResponse struct {
// contains filtered or unexported fields
}
func (*StopForwardPortResponse) Descriptor
deprecated
func (*StopForwardPortResponse) Descriptor() ([]byte, []int)
Deprecated: Use StopForwardPortResponse.ProtoReflect.Descriptor instead.
func (*StopForwardPortResponse) ProtoMessage ¶
func (*StopForwardPortResponse) ProtoMessage()
func (*StopForwardPortResponse) ProtoReflect ¶
func (x *StopForwardPortResponse) ProtoReflect() protoreflect.Message
func (*StopForwardPortResponse) Reset ¶
func (x *StopForwardPortResponse) Reset()
func (*StopForwardPortResponse) String ¶
func (x *StopForwardPortResponse) String() string
type StreamMountRequest ¶
type StreamMountRequest struct {
Mount string `protobuf:"bytes,1,opt,name=mount,proto3" json:"mount,omitempty"`
// contains filtered or unexported fields
}
func (*StreamMountRequest) Descriptor
deprecated
func (*StreamMountRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamMountRequest.ProtoReflect.Descriptor instead.
func (*StreamMountRequest) GetMount ¶
func (x *StreamMountRequest) GetMount() string
func (*StreamMountRequest) ProtoMessage ¶
func (*StreamMountRequest) ProtoMessage()
func (*StreamMountRequest) ProtoReflect ¶
func (x *StreamMountRequest) ProtoReflect() protoreflect.Message
func (*StreamMountRequest) Reset ¶
func (x *StreamMountRequest) Reset()
func (*StreamMountRequest) String ¶
func (x *StreamMountRequest) String() string
type TunnelClient ¶
type TunnelClient interface {
Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
Log(ctx context.Context, in *LogMessage, opts ...grpc.CallOption) (*Empty, error)
Status(ctx context.Context, in *StatusUpdate, opts ...grpc.CallOption) (*Empty, error)
AppendSetupLogs(ctx context.Context, in *AppendSetupLogsRequest, opts ...grpc.CallOption) (*AppendSetupLogsResponse, error)
SendResult(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Empty, error)
DockerCredentials(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
GitCredentials(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
GitHubCredentials(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Message, error)
GitSSHSignature(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
GitUser(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Message, error)
DevsyConfig(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
GPGPublicKeys(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
KubeConfig(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
Secrets(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SecretsResponse, error)
ForwardPort(ctx context.Context, in *ForwardPortRequest, opts ...grpc.CallOption) (*ForwardPortResponse, error)
StopForwardPort(ctx context.Context, in *StopForwardPortRequest, opts ...grpc.CallOption) (*StopForwardPortResponse, error)
StreamWorkspace(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Chunk], error)
StreamMount(ctx context.Context, in *StreamMountRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Chunk], error)
StreamSnapshotVolumes(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Chunk], error)
}
TunnelClient is the client API for Tunnel 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 NewTunnelClient ¶
func NewTunnelClient(cc grpc.ClientConnInterface) TunnelClient
type TunnelServer ¶
type TunnelServer interface {
Ping(context.Context, *Empty) (*Empty, error)
Log(context.Context, *LogMessage) (*Empty, error)
Status(context.Context, *StatusUpdate) (*Empty, error)
AppendSetupLogs(context.Context, *AppendSetupLogsRequest) (*AppendSetupLogsResponse, error)
SendResult(context.Context, *Message) (*Empty, error)
DockerCredentials(context.Context, *Message) (*Message, error)
GitCredentials(context.Context, *Message) (*Message, error)
GitHubCredentials(context.Context, *Empty) (*Message, error)
GitSSHSignature(context.Context, *Message) (*Message, error)
GitUser(context.Context, *Empty) (*Message, error)
DevsyConfig(context.Context, *Message) (*Message, error)
GPGPublicKeys(context.Context, *Message) (*Message, error)
KubeConfig(context.Context, *Message) (*Message, error)
Secrets(context.Context, *Empty) (*SecretsResponse, error)
ForwardPort(context.Context, *ForwardPortRequest) (*ForwardPortResponse, error)
StopForwardPort(context.Context, *StopForwardPortRequest) (*StopForwardPortResponse, error)
StreamWorkspace(*Empty, grpc.ServerStreamingServer[Chunk]) error
StreamMount(*StreamMountRequest, grpc.ServerStreamingServer[Chunk]) error
StreamSnapshotVolumes(*Empty, grpc.ServerStreamingServer[Chunk]) error
// contains filtered or unexported methods
}
TunnelServer is the server API for Tunnel service. All implementations must embed UnimplementedTunnelServer for forward compatibility.
type Tunnel_StreamMountClient ¶
type Tunnel_StreamMountClient = grpc.ServerStreamingClient[Chunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Tunnel_StreamMountServer ¶
type Tunnel_StreamMountServer = grpc.ServerStreamingServer[Chunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Tunnel_StreamSnapshotVolumesClient ¶ added in v1.14.0
type Tunnel_StreamSnapshotVolumesClient = grpc.ServerStreamingClient[Chunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Tunnel_StreamSnapshotVolumesServer ¶ added in v1.14.0
type Tunnel_StreamSnapshotVolumesServer = grpc.ServerStreamingServer[Chunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Tunnel_StreamWorkspaceClient ¶
type Tunnel_StreamWorkspaceClient = grpc.ServerStreamingClient[Chunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Tunnel_StreamWorkspaceServer ¶
type Tunnel_StreamWorkspaceServer = grpc.ServerStreamingServer[Chunk]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedTunnelServer ¶
type UnimplementedTunnelServer struct{}
UnimplementedTunnelServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedTunnelServer) AppendSetupLogs ¶
func (UnimplementedTunnelServer) AppendSetupLogs(context.Context, *AppendSetupLogsRequest) (*AppendSetupLogsResponse, error)
func (UnimplementedTunnelServer) DevsyConfig ¶
func (UnimplementedTunnelServer) DockerCredentials ¶
func (UnimplementedTunnelServer) ForwardPort ¶
func (UnimplementedTunnelServer) ForwardPort(context.Context, *ForwardPortRequest) (*ForwardPortResponse, error)
func (UnimplementedTunnelServer) GPGPublicKeys ¶
func (UnimplementedTunnelServer) GitCredentials ¶
func (UnimplementedTunnelServer) GitHubCredentials ¶ added in v1.25.0
func (UnimplementedTunnelServer) GitSSHSignature ¶
func (UnimplementedTunnelServer) KubeConfig ¶
func (UnimplementedTunnelServer) Log ¶
func (UnimplementedTunnelServer) Log(context.Context, *LogMessage) (*Empty, error)
func (UnimplementedTunnelServer) Secrets ¶ added in v1.10.0
func (UnimplementedTunnelServer) Secrets(context.Context, *Empty) (*SecretsResponse, error)
func (UnimplementedTunnelServer) SendResult ¶
func (UnimplementedTunnelServer) Status ¶ added in v1.13.0
func (UnimplementedTunnelServer) Status(context.Context, *StatusUpdate) (*Empty, error)
func (UnimplementedTunnelServer) StopForwardPort ¶
func (UnimplementedTunnelServer) StopForwardPort(context.Context, *StopForwardPortRequest) (*StopForwardPortResponse, error)
func (UnimplementedTunnelServer) StreamMount ¶
func (UnimplementedTunnelServer) StreamMount(*StreamMountRequest, grpc.ServerStreamingServer[Chunk]) error
func (UnimplementedTunnelServer) StreamSnapshotVolumes ¶ added in v1.14.0
func (UnimplementedTunnelServer) StreamSnapshotVolumes(*Empty, grpc.ServerStreamingServer[Chunk]) error
func (UnimplementedTunnelServer) StreamWorkspace ¶
func (UnimplementedTunnelServer) StreamWorkspace(*Empty, grpc.ServerStreamingServer[Chunk]) error
type UnsafeTunnelServer ¶
type UnsafeTunnelServer interface {
// contains filtered or unexported methods
}
UnsafeTunnelServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TunnelServer will result in compilation errors.