events

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tunnel_Type_name = map[int32]string{
		0: "UNSET",
		1: "AUTH_REQUEST",
		2: "AUTH_RESPONSE",
		3: "OUTBOUND_MESSAGE",
		4: "REPLAY_EVENT",
		5: "TUNNEL_EVENT",
	}
	Tunnel_Type_value = map[string]int32{
		"UNSET":            0,
		"AUTH_REQUEST":     1,
		"AUTH_RESPONSE":    2,
		"OUTBOUND_MESSAGE": 3,
		"REPLAY_EVENT":     4,
		"TUNNEL_EVENT":     5,
	}
)

Enum value maps for Tunnel_Type.

View Source
var (
	ReplayEvent_Type_name = map[int32]string{
		0: "UNSET",
		1: "CREATE_REPLAY",
		2: "PAUSE_REPLAY",
		3: "RESUME_REPLAY",
		4: "ABORT_REPLAY",
		5: "FINISH_REPLAY",
		6: "DISCONNECT",
	}
	ReplayEvent_Type_value = map[string]int32{
		"UNSET":         0,
		"CREATE_REPLAY": 1,
		"PAUSE_REPLAY":  2,
		"RESUME_REPLAY": 3,
		"ABORT_REPLAY":  4,
		"FINISH_REPLAY": 5,
		"DISCONNECT":    6,
	}
)

Enum value maps for ReplayEvent_Type.

View Source
var (
	TunnelEvent_Type_name = map[int32]string{
		0: "UNSET",
		1: "FORCE_DISCONNECT",
	}
	TunnelEvent_Type_value = map[string]int32{
		"UNSET":            0,
		"FORCE_DISCONNECT": 1,
	}
)

Enum value maps for TunnelEvent_Type.

View Source
var File_cs_events_outbound_proto protoreflect.FileDescriptor
View Source
var File_cs_events_tunnel_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {

	// API Token generated in https://console.batch.sh
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Message bus type name, ex: kafka, rabbitmq, etc.
	MessageBus string `protobuf:"bytes,2,opt,name=message_bus,json=messageBus,proto3" json:"message_bus,omitempty"`
	// Tunnels can be given a custom name to help identify them in the plumber server.
	// If this value is empty, a default name will be generated based off of message_bus and the
	// connecting IP address
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Plumber server mode needs permanent tunnels without creating multiple
	// destinations in console for all running plumber instances  in a cluster.
	// If cluster ID is specified, we will use that + team ID + connection ID = unique identifier
	// so that we can always reconnect to the same tunnel.
	//
	// Tunnels without this value specified will be created as ephemeral tunnels.
	// Ephemeral tunnels will be deleted after 3 hours of inactivity.
	PlumberClusterId string `protobuf:"bytes,4,opt,name=plumber_cluster_id,json=plumberClusterId,proto3" json:"plumber_cluster_id,omitempty"`
	TunnelId         string `protobuf:"bytes,5,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"`
	// Version of plumber running. Not needed at the moment, but good future-proofing
	PlumberVersion string `protobuf:"bytes,6,opt,name=plumber_version,json=plumberVersion,proto3" json:"plumber_version,omitempty"`
	// ID of the plumber instance running. This will be saved in either NATS or ~/.batchsh/plumber.json
	PlumberId string `protobuf:"bytes,7,opt,name=plumber_id,json=plumberId,proto3" json:"plumber_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthRequest) Descriptor deprecated

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

Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.

func (*AuthRequest) GetMessageBus

func (x *AuthRequest) GetMessageBus() string

func (*AuthRequest) GetName added in v0.0.13

func (x *AuthRequest) GetName() string

func (*AuthRequest) GetPlumberClusterId added in v0.0.13

func (x *AuthRequest) GetPlumberClusterId() string

func (*AuthRequest) GetPlumberId added in v0.0.20

func (x *AuthRequest) GetPlumberId() string

func (*AuthRequest) GetPlumberVersion added in v0.0.20

func (x *AuthRequest) GetPlumberVersion() string

func (*AuthRequest) GetToken

func (x *AuthRequest) GetToken() string

func (*AuthRequest) GetTunnelId added in v0.0.15

func (x *AuthRequest) GetTunnelId() string

func (*AuthRequest) ProtoMessage

func (*AuthRequest) ProtoMessage()

func (*AuthRequest) ProtoReflect added in v0.0.24

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

func (*AuthRequest) Reset

func (x *AuthRequest) Reset()

func (*AuthRequest) String

func (x *AuthRequest) String() string

type AuthResponse

type AuthResponse struct {

	// Whether or not the connection is authorized
	Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
	// Error message if any
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthResponse) Descriptor deprecated

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

Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.

func (*AuthResponse) GetAuthorized

func (x *AuthResponse) GetAuthorized() bool

func (*AuthResponse) GetMessage

func (x *AuthResponse) GetMessage() string

func (*AuthResponse) ProtoMessage

func (*AuthResponse) ProtoMessage()

func (*AuthResponse) ProtoReflect added in v0.0.24

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

func (*AuthResponse) Reset

func (x *AuthResponse) Reset()

func (*AuthResponse) String

func (x *AuthResponse) String() string

type DeleteTunnelRequest added in v0.0.16

type DeleteTunnelRequest struct {

	// API Token generated in https://console.batch.sh
	Token            string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	PlumberClusterId string `protobuf:"bytes,2,opt,name=plumber_cluster_id,json=plumberClusterId,proto3" json:"plumber_cluster_id,omitempty"`
	TunnelId         string `protobuf:"bytes,3,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteTunnelRequest) Descriptor deprecated added in v0.0.16

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

Deprecated: Use DeleteTunnelRequest.ProtoReflect.Descriptor instead.

func (*DeleteTunnelRequest) GetPlumberClusterId added in v0.0.16

func (x *DeleteTunnelRequest) GetPlumberClusterId() string

func (*DeleteTunnelRequest) GetToken added in v0.0.16

func (x *DeleteTunnelRequest) GetToken() string

func (*DeleteTunnelRequest) GetTunnelId added in v0.0.16

func (x *DeleteTunnelRequest) GetTunnelId() string

func (*DeleteTunnelRequest) ProtoMessage added in v0.0.16

func (*DeleteTunnelRequest) ProtoMessage()

func (*DeleteTunnelRequest) ProtoReflect added in v0.0.24

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

func (*DeleteTunnelRequest) Reset added in v0.0.16

func (x *DeleteTunnelRequest) Reset()

func (*DeleteTunnelRequest) String added in v0.0.16

func (x *DeleteTunnelRequest) String() string

type DeleteTunnelResponse added in v0.0.16

type DeleteTunnelResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteTunnelResponse) Descriptor deprecated added in v0.0.16

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

Deprecated: Use DeleteTunnelResponse.ProtoReflect.Descriptor instead.

func (*DeleteTunnelResponse) GetMessage added in v0.0.16

func (x *DeleteTunnelResponse) GetMessage() string

func (*DeleteTunnelResponse) GetSuccess added in v0.0.16

func (x *DeleteTunnelResponse) GetSuccess() bool

func (*DeleteTunnelResponse) ProtoMessage added in v0.0.16

func (*DeleteTunnelResponse) ProtoMessage()

func (*DeleteTunnelResponse) ProtoReflect added in v0.0.24

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

func (*DeleteTunnelResponse) Reset added in v0.0.16

func (x *DeleteTunnelResponse) Reset()

func (*DeleteTunnelResponse) String added in v0.0.16

func (x *DeleteTunnelResponse) String() string

type Outbound

type Outbound struct {
	ReplayId            string            `protobuf:"bytes,1,opt,name=replay_id,json=replayId,proto3" json:"replay_id,omitempty"`
	Blob                []byte            `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"`
	Last                bool              `protobuf:"varint,3,opt,name=last,proto3" json:"last,omitempty"`
	Metadata            map[string]string `` /* 157-byte string literal not displayed */
	IngestTimestampNano int64             `protobuf:"varint,5,opt,name=ingest_timestamp_nano,json=ingestTimestampNano,proto3" json:"ingest_timestamp_nano,omitempty"`
	// contains filtered or unexported fields
}

Emitted by the reader to HSB which is then consumed by the replayer and dProxy

func (*Outbound) Descriptor deprecated

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

Deprecated: Use Outbound.ProtoReflect.Descriptor instead.

func (*Outbound) GetBlob

func (x *Outbound) GetBlob() []byte

func (*Outbound) GetIngestTimestampNano added in v0.0.23

func (x *Outbound) GetIngestTimestampNano() int64

func (*Outbound) GetLast

func (x *Outbound) GetLast() bool

func (*Outbound) GetMetadata added in v0.0.6

func (x *Outbound) GetMetadata() map[string]string

func (*Outbound) GetReplayId

func (x *Outbound) GetReplayId() string

func (*Outbound) ProtoMessage

func (*Outbound) ProtoMessage()

func (*Outbound) ProtoReflect added in v0.0.24

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

func (*Outbound) Reset

func (x *Outbound) Reset()

func (*Outbound) String

func (x *Outbound) String() string

type ReplayEvent

type ReplayEvent struct {
	Type     ReplayEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=events.ReplayEvent_Type" json:"type,omitempty"`
	ReplayId string           `protobuf:"bytes,2,opt,name=replay_id,json=replayId,proto3" json:"replay_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplayEvent) Descriptor deprecated

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

Deprecated: Use ReplayEvent.ProtoReflect.Descriptor instead.

func (*ReplayEvent) GetReplayId

func (x *ReplayEvent) GetReplayId() string

func (*ReplayEvent) GetType

func (x *ReplayEvent) GetType() ReplayEvent_Type

func (*ReplayEvent) ProtoMessage

func (*ReplayEvent) ProtoMessage()

func (*ReplayEvent) ProtoReflect added in v0.0.24

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

func (*ReplayEvent) Reset

func (x *ReplayEvent) Reset()

func (*ReplayEvent) String

func (x *ReplayEvent) String() string

type ReplayEvent_Type

type ReplayEvent_Type int32
const (
	ReplayEvent_UNSET         ReplayEvent_Type = 0
	ReplayEvent_CREATE_REPLAY ReplayEvent_Type = 1
	ReplayEvent_PAUSE_REPLAY  ReplayEvent_Type = 2
	ReplayEvent_RESUME_REPLAY ReplayEvent_Type = 3
	ReplayEvent_ABORT_REPLAY  ReplayEvent_Type = 4
	ReplayEvent_FINISH_REPLAY ReplayEvent_Type = 5
	ReplayEvent_DISCONNECT    ReplayEvent_Type = 6
)

func (ReplayEvent_Type) Descriptor added in v0.0.24

func (ReplayEvent_Type) Enum added in v0.0.24

func (ReplayEvent_Type) EnumDescriptor deprecated

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

Deprecated: Use ReplayEvent_Type.Descriptor instead.

func (ReplayEvent_Type) Number added in v0.0.24

func (ReplayEvent_Type) String

func (x ReplayEvent_Type) String() string

func (ReplayEvent_Type) Type added in v0.0.24

type Tunnel added in v0.0.15

type Tunnel struct {
	Type     Tunnel_Type `protobuf:"varint,1,opt,name=type,proto3,enum=events.Tunnel_Type" json:"type,omitempty"`
	ReplayId string      `protobuf:"bytes,2,opt,name=replay_id,json=replayId,proto3" json:"replay_id,omitempty"`
	// Types that are assignable to Payload:
	//
	//	*Tunnel_AuthRequest
	//	*Tunnel_AuthResponse
	//	*Tunnel_OutboundMessage
	//	*Tunnel_ReplayMessage
	//	*Tunnel_TunnelEvent
	Payload isTunnel_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

Tunnel is an envelope message for tunnel communication between dproxy and plumber

func (*Tunnel) Descriptor deprecated added in v0.0.15

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

Deprecated: Use Tunnel.ProtoReflect.Descriptor instead.

func (*Tunnel) GetAuthRequest added in v0.0.15

func (x *Tunnel) GetAuthRequest() *AuthRequest

func (*Tunnel) GetAuthResponse added in v0.0.15

func (x *Tunnel) GetAuthResponse() *AuthResponse

func (*Tunnel) GetOutboundMessage added in v0.0.15

func (x *Tunnel) GetOutboundMessage() *Outbound

func (*Tunnel) GetPayload added in v0.0.15

func (m *Tunnel) GetPayload() isTunnel_Payload

func (*Tunnel) GetReplayId added in v0.0.15

func (x *Tunnel) GetReplayId() string

func (*Tunnel) GetReplayMessage added in v0.0.15

func (x *Tunnel) GetReplayMessage() *ReplayEvent

func (*Tunnel) GetTunnelEvent added in v0.0.18

func (x *Tunnel) GetTunnelEvent() *TunnelEvent

func (*Tunnel) GetType added in v0.0.15

func (x *Tunnel) GetType() Tunnel_Type

func (*Tunnel) ProtoMessage added in v0.0.15

func (*Tunnel) ProtoMessage()

func (*Tunnel) ProtoReflect added in v0.0.24

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

func (*Tunnel) Reset added in v0.0.15

func (x *Tunnel) Reset()

func (*Tunnel) String added in v0.0.15

func (x *Tunnel) String() string

type TunnelEvent added in v0.0.18

type TunnelEvent struct {
	Type     TunnelEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=events.TunnelEvent_Type" json:"type,omitempty"`
	TunnelId string           `protobuf:"bytes,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"`
	// contains filtered or unexported fields
}

func (*TunnelEvent) Descriptor deprecated added in v0.0.18

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

Deprecated: Use TunnelEvent.ProtoReflect.Descriptor instead.

func (*TunnelEvent) GetTunnelId added in v0.0.18

func (x *TunnelEvent) GetTunnelId() string

func (*TunnelEvent) GetType added in v0.0.19

func (x *TunnelEvent) GetType() TunnelEvent_Type

func (*TunnelEvent) ProtoMessage added in v0.0.18

func (*TunnelEvent) ProtoMessage()

func (*TunnelEvent) ProtoReflect added in v0.0.24

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

func (*TunnelEvent) Reset added in v0.0.18

func (x *TunnelEvent) Reset()

func (*TunnelEvent) String added in v0.0.18

func (x *TunnelEvent) String() string

type TunnelEvent_Type added in v0.0.18

type TunnelEvent_Type int32
const (
	TunnelEvent_UNSET TunnelEvent_Type = 0
	// Used when an ephemeral tunnel destination is deleted from ui-bff
	// This action will cause dProxy to send this event, forcing plumber to disconnect
	TunnelEvent_FORCE_DISCONNECT TunnelEvent_Type = 1
)

func (TunnelEvent_Type) Descriptor added in v0.0.24

func (TunnelEvent_Type) Enum added in v0.0.24

func (TunnelEvent_Type) EnumDescriptor deprecated added in v0.0.18

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

Deprecated: Use TunnelEvent_Type.Descriptor instead.

func (TunnelEvent_Type) Number added in v0.0.24

func (TunnelEvent_Type) String added in v0.0.18

func (x TunnelEvent_Type) String() string

func (TunnelEvent_Type) Type added in v0.0.24

type Tunnel_AuthRequest added in v0.0.15

type Tunnel_AuthRequest struct {
	AuthRequest *AuthRequest `protobuf:"bytes,100,opt,name=auth_request,json=authRequest,proto3,oneof"`
}

type Tunnel_AuthResponse added in v0.0.15

type Tunnel_AuthResponse struct {
	AuthResponse *AuthResponse `protobuf:"bytes,101,opt,name=auth_response,json=authResponse,proto3,oneof"`
}

type Tunnel_OutboundMessage added in v0.0.15

type Tunnel_OutboundMessage struct {
	OutboundMessage *Outbound `protobuf:"bytes,102,opt,name=outbound_message,json=outboundMessage,proto3,oneof"`
}

type Tunnel_ReplayMessage added in v0.0.15

type Tunnel_ReplayMessage struct {
	ReplayMessage *ReplayEvent `protobuf:"bytes,103,opt,name=replay_message,json=replayMessage,proto3,oneof"`
}

type Tunnel_TunnelEvent added in v0.0.18

type Tunnel_TunnelEvent struct {
	TunnelEvent *TunnelEvent `protobuf:"bytes,104,opt,name=tunnel_event,json=tunnelEvent,proto3,oneof"`
}

type Tunnel_Type added in v0.0.15

type Tunnel_Type int32
const (
	Tunnel_UNSET Tunnel_Type = 0
	// Sent by plumber to dProxy
	Tunnel_AUTH_REQUEST Tunnel_Type = 1
	// Sent by dProxy to plumber
	Tunnel_AUTH_RESPONSE Tunnel_Type = 2
	// Sent by dProxy to plumber
	// Contains an events.Outbound message with a replay payload
	Tunnel_OUTBOUND_MESSAGE Tunnel_Type = 3
	// Sent by dProxy to plumber
	// Replicates an ISB replay event message for display in plumber logs
	Tunnel_REPLAY_EVENT Tunnel_Type = 4
	// Sent by dProxy to plumber
	// Currently only used for force-disconnecting an ephemeral tunnel
	Tunnel_TUNNEL_EVENT Tunnel_Type = 5
)

func (Tunnel_Type) Descriptor added in v0.0.24

func (Tunnel_Type) Enum added in v0.0.24

func (x Tunnel_Type) Enum() *Tunnel_Type

func (Tunnel_Type) EnumDescriptor deprecated added in v0.0.15

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

Deprecated: Use Tunnel_Type.Descriptor instead.

func (Tunnel_Type) Number added in v0.0.24

func (x Tunnel_Type) Number() protoreflect.EnumNumber

func (Tunnel_Type) String added in v0.0.15

func (x Tunnel_Type) String() string

func (Tunnel_Type) Type added in v0.0.24

Jump to

Keyboard shortcuts

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