ptproxy

package
v0.0.0-...-0888c38 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const PassthroughRequestChannel = "c2v.VizierPassthroughRequest"

PassthroughRequestChannel is the NATS channel over which stream API requests are sent.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecuteScriptStream

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

ExecuteScriptStream is a wrapper around the executeScript stream.

func NewExecuteScriptStream

func NewExecuteScriptStream(vzClient vizierpb.VizierServiceClient) *ExecuteScriptStream

NewExecuteScriptStream creates a new executeScriptStream.

func (*ExecuteScriptStream) Recv

Recv gets the next message on the stream.

func (*ExecuteScriptStream) StartStream

func (e *ExecuteScriptStream) StartStream(ctx context.Context, reqID string, req *cvmsgspb.C2VAPIStreamRequest) error

StartStream starts the ExecuteScript stream with the given request.

type HealthCheckStream

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

HealthCheckStream is a wrapper around the health check stream.

func NewHealthCheckStream

func NewHealthCheckStream(vzClient vizierpb.VizierServiceClient) *HealthCheckStream

NewHealthCheckStream creates a new healthCheckStream.

func (*HealthCheckStream) Recv

Recv gets the next message on the stream.

func (*HealthCheckStream) StartStream

func (e *HealthCheckStream) StartStream(ctx context.Context, reqID string, req *cvmsgspb.C2VAPIStreamRequest) error

StartStream starts the HealthCheck stream with the given request.

type PassThroughProxy

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

PassThroughProxy listens to NATS for any stream API requests and makes the necessary grpc requests to downstream services.

func NewPassThroughProxy

func NewPassThroughProxy(nc *nats.Conn, vzClient vizierpb.VizierServiceClient) (*PassThroughProxy, error)

NewPassThroughProxy creates a new stream API listener.

func (*PassThroughProxy) Close

func (s *PassThroughProxy) Close()

Close stops the API listener and cleans up any state.

func (*PassThroughProxy) HandleMessage

func (s *PassThroughProxy) HandleMessage(msg *nats.Msg)

HandleMessage handles a stream API request or cancel request.

func (*PassThroughProxy) Run

func (s *PassThroughProxy) Run() error

Run starts the stream listener.

type RequestState

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

RequestState is the state information for a stream API request.

type Stream

type Stream interface {
	StartStream(ctx context.Context, requestID string, req *cvmsgspb.C2VAPIStreamRequest) error
	Recv() (*cvmsgspb.V2CAPIStreamResponse, error)
}

Stream is a wrapper around a GRPC stream.

Jump to

Keyboard shortcuts

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