forwarding

package
v0.12.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_service_forwarding_forwarding_proto protoreflect.FileDescriptor

Functions

func RegisterForwardingServer

func RegisterForwardingServer(s *grpc.Server, srv ForwardingServer)

Types

type CreateRequest

type CreateRequest struct {

	// Prompter is the prompter identifier to use for creating sessions.
	Prompter string `protobuf:"bytes,1,opt,name=prompter,proto3" json:"prompter,omitempty"`
	// Specification is the creation specification.
	Specification *CreationSpecification `protobuf:"bytes,2,opt,name=specification,proto3" json:"specification,omitempty"`
	// contains filtered or unexported fields
}

CreateRequest encodes a request for session creation.

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetPrompter added in v0.12.0

func (x *CreateRequest) GetPrompter() string

func (*CreateRequest) GetSpecification

func (x *CreateRequest) GetSpecification() *CreationSpecification

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect added in v0.12.0

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {

	// Session is the resulting session identifier.
	Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

CreateResponse encodes a session creation response.

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) EnsureValid

func (r *CreateResponse) EnsureValid() error

EnsureValid verifies that a CreateResponse is valid.

func (*CreateResponse) GetSession

func (x *CreateResponse) GetSession() string

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect added in v0.12.0

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type CreationSpecification

type CreationSpecification struct {

	// Source is the source endpoint URL for the session.
	Source *url.URL `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// Destination is the destination endpoint URL for the session.
	Destination *url.URL `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
	// Configuration is the base session configuration. It is the result of
	// merging the global configuration (unless disabled), any manually
	// specified configuration file, and any command line configuration
	// parameters.
	Configuration *forwarding.Configuration `protobuf:"bytes,3,opt,name=configuration,proto3" json:"configuration,omitempty"`
	// ConfigurationSource is the source-specific session configuration. It is
	// determined based on command line configuration parameters.
	ConfigurationSource *forwarding.Configuration `protobuf:"bytes,4,opt,name=configurationSource,proto3" json:"configurationSource,omitempty"`
	// ConfigurationDestination is the destination-specific session
	// configuration. It is determined based on command line configuration
	// parameters.
	ConfigurationDestination *forwarding.Configuration `protobuf:"bytes,5,opt,name=configurationDestination,proto3" json:"configurationDestination,omitempty"`
	// Name is the name for the session object.
	Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
	// Labels are the labels for the session object.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Paused indicates whether or not to create the session pre-paused.
	Paused bool `protobuf:"varint,8,opt,name=paused,proto3" json:"paused,omitempty"`
	// contains filtered or unexported fields
}

CreationSpecification contains the metadata required for a new session.

func (*CreationSpecification) Descriptor deprecated

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

Deprecated: Use CreationSpecification.ProtoReflect.Descriptor instead.

func (*CreationSpecification) GetConfiguration

func (x *CreationSpecification) GetConfiguration() *forwarding.Configuration

func (*CreationSpecification) GetConfigurationDestination

func (x *CreationSpecification) GetConfigurationDestination() *forwarding.Configuration

func (*CreationSpecification) GetConfigurationSource

func (x *CreationSpecification) GetConfigurationSource() *forwarding.Configuration

func (*CreationSpecification) GetDestination

func (x *CreationSpecification) GetDestination() *url.URL

func (*CreationSpecification) GetLabels

func (x *CreationSpecification) GetLabels() map[string]string

func (*CreationSpecification) GetName

func (x *CreationSpecification) GetName() string

func (*CreationSpecification) GetPaused

func (x *CreationSpecification) GetPaused() bool

func (*CreationSpecification) GetSource

func (x *CreationSpecification) GetSource() *url.URL

func (*CreationSpecification) ProtoMessage

func (*CreationSpecification) ProtoMessage()

func (*CreationSpecification) ProtoReflect added in v0.12.0

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

func (*CreationSpecification) Reset

func (x *CreationSpecification) Reset()

func (*CreationSpecification) String

func (x *CreationSpecification) String() string

type ForwardingClient

type ForwardingClient interface {
	// Create creates a new session.
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	// List returns metadata for existing sessions.
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	// Pause pauses sessions.
	Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*PauseResponse, error)
	// Resume resumes paused or disconnected sessions.
	Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*ResumeResponse, error)
	// Terminate terminates sessions.
	Terminate(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*TerminateResponse, error)
}

ForwardingClient is the client API for Forwarding service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewForwardingClient

func NewForwardingClient(cc grpc.ClientConnInterface) ForwardingClient

type ForwardingServer

type ForwardingServer interface {
	// Create creates a new session.
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	// List returns metadata for existing sessions.
	List(context.Context, *ListRequest) (*ListResponse, error)
	// Pause pauses sessions.
	Pause(context.Context, *PauseRequest) (*PauseResponse, error)
	// Resume resumes paused or disconnected sessions.
	Resume(context.Context, *ResumeRequest) (*ResumeResponse, error)
	// Terminate terminates sessions.
	Terminate(context.Context, *TerminateRequest) (*TerminateResponse, error)
}

ForwardingServer is the server API for Forwarding service.

type ListRequest

type ListRequest struct {

	// Selection is the session selection criteria.
	Selection *selection.Selection `protobuf:"bytes,1,opt,name=selection,proto3" json:"selection,omitempty"`
	// PreviousStateIndex is the previously seen state index. 0 may be provided
	// to force an immediate state listing.
	PreviousStateIndex uint64 `protobuf:"varint,2,opt,name=previousStateIndex,proto3" json:"previousStateIndex,omitempty"`
	// contains filtered or unexported fields
}

ListRequest encodes a request for session metadata.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetPreviousStateIndex

func (x *ListRequest) GetPreviousStateIndex() uint64

func (*ListRequest) GetSelection

func (x *ListRequest) GetSelection() *selection.Selection

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect added in v0.12.0

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {

	// StateIndex is the state index associated with the session metadata.
	StateIndex uint64 `protobuf:"varint,1,opt,name=stateIndex,proto3" json:"stateIndex,omitempty"`
	// SessionStates are the session metadata states.
	SessionStates []*forwarding.State `protobuf:"bytes,2,rep,name=sessionStates,proto3" json:"sessionStates,omitempty"`
	// contains filtered or unexported fields
}

ListResponse encodes session metadata.

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) EnsureValid

func (r *ListResponse) EnsureValid() error

ensureValid verifies that a ListResponse is valid.

func (*ListResponse) GetSessionStates

func (x *ListResponse) GetSessionStates() []*forwarding.State

func (*ListResponse) GetStateIndex

func (x *ListResponse) GetStateIndex() uint64

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect added in v0.12.0

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type PauseRequest

type PauseRequest struct {

	// Prompter is the prompter to use for status message updates.
	Prompter string `protobuf:"bytes,1,opt,name=prompter,proto3" json:"prompter,omitempty"`
	// Selection is the session selection criteria.
	Selection *selection.Selection `protobuf:"bytes,2,opt,name=selection,proto3" json:"selection,omitempty"`
	// contains filtered or unexported fields
}

PauseRequest encodes a request to pause sessions.

func (*PauseRequest) Descriptor deprecated

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

Deprecated: Use PauseRequest.ProtoReflect.Descriptor instead.

func (*PauseRequest) GetPrompter added in v0.12.0

func (x *PauseRequest) GetPrompter() string

func (*PauseRequest) GetSelection

func (x *PauseRequest) GetSelection() *selection.Selection

func (*PauseRequest) ProtoMessage

func (*PauseRequest) ProtoMessage()

func (*PauseRequest) ProtoReflect added in v0.12.0

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

func (*PauseRequest) Reset

func (x *PauseRequest) Reset()

func (*PauseRequest) String

func (x *PauseRequest) String() string

type PauseResponse

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

PauseResponse indicates completion of pause operation(s).

func (*PauseResponse) Descriptor deprecated

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

Deprecated: Use PauseResponse.ProtoReflect.Descriptor instead.

func (*PauseResponse) EnsureValid

func (r *PauseResponse) EnsureValid() error

EnsureValid verifies that a PauseResponse is valid.

func (*PauseResponse) ProtoMessage

func (*PauseResponse) ProtoMessage()

func (*PauseResponse) ProtoReflect added in v0.12.0

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

func (*PauseResponse) Reset

func (x *PauseResponse) Reset()

func (*PauseResponse) String

func (x *PauseResponse) String() string

type ResumeRequest

type ResumeRequest struct {

	// Prompter is the prompter identifier to use for resuming sessions.
	Prompter string `protobuf:"bytes,1,opt,name=prompter,proto3" json:"prompter,omitempty"`
	// Selection is the session selection criteria.
	Selection *selection.Selection `protobuf:"bytes,2,opt,name=selection,proto3" json:"selection,omitempty"`
	// contains filtered or unexported fields
}

ResumeRequest encodes a request to resume sessions.

func (*ResumeRequest) Descriptor deprecated

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

Deprecated: Use ResumeRequest.ProtoReflect.Descriptor instead.

func (*ResumeRequest) GetPrompter added in v0.12.0

func (x *ResumeRequest) GetPrompter() string

func (*ResumeRequest) GetSelection

func (x *ResumeRequest) GetSelection() *selection.Selection

func (*ResumeRequest) ProtoMessage

func (*ResumeRequest) ProtoMessage()

func (*ResumeRequest) ProtoReflect added in v0.12.0

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

func (*ResumeRequest) Reset

func (x *ResumeRequest) Reset()

func (*ResumeRequest) String

func (x *ResumeRequest) String() string

type ResumeResponse

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

ResumeResponse indicates completion of resume operation(s).

func (*ResumeResponse) Descriptor deprecated

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

Deprecated: Use ResumeResponse.ProtoReflect.Descriptor instead.

func (*ResumeResponse) EnsureValid

func (r *ResumeResponse) EnsureValid() error

EnsureValid verifies that a ResumeResponse is valid.

func (*ResumeResponse) ProtoMessage

func (*ResumeResponse) ProtoMessage()

func (*ResumeResponse) ProtoReflect added in v0.12.0

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

func (*ResumeResponse) Reset

func (x *ResumeResponse) Reset()

func (*ResumeResponse) String

func (x *ResumeResponse) String() string

type Server

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

Server provides an implementation of the Forwarding service.

func NewServer

func NewServer(manager *forwarding.Manager) *Server

NewServer creates a new session server.

func (*Server) Create

func (s *Server) Create(ctx context.Context, request *CreateRequest) (*CreateResponse, error)

Create creates a new session.

func (*Server) List

func (s *Server) List(ctx context.Context, request *ListRequest) (*ListResponse, error)

List lists existing sessions.

func (*Server) Pause

func (s *Server) Pause(ctx context.Context, request *PauseRequest) (*PauseResponse, error)

Pause pauses existing sessions.

func (*Server) Resume

func (s *Server) Resume(ctx context.Context, request *ResumeRequest) (*ResumeResponse, error)

Resume resumes existing sessions.

func (*Server) Terminate

func (s *Server) Terminate(ctx context.Context, request *TerminateRequest) (*TerminateResponse, error)

Terminate terminates existing sessions.

type TerminateRequest

type TerminateRequest struct {

	// Prompter is the prompter to use for status message updates.
	Prompter string `protobuf:"bytes,1,opt,name=prompter,proto3" json:"prompter,omitempty"`
	// Selection is the session selection criteria.
	Selection *selection.Selection `protobuf:"bytes,2,opt,name=selection,proto3" json:"selection,omitempty"`
	// contains filtered or unexported fields
}

TerminateRequest encodes a request to terminate sessions.

func (*TerminateRequest) Descriptor deprecated

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

Deprecated: Use TerminateRequest.ProtoReflect.Descriptor instead.

func (*TerminateRequest) GetPrompter added in v0.12.0

func (x *TerminateRequest) GetPrompter() string

func (*TerminateRequest) GetSelection

func (x *TerminateRequest) GetSelection() *selection.Selection

func (*TerminateRequest) ProtoMessage

func (*TerminateRequest) ProtoMessage()

func (*TerminateRequest) ProtoReflect added in v0.12.0

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

func (*TerminateRequest) Reset

func (x *TerminateRequest) Reset()

func (*TerminateRequest) String

func (x *TerminateRequest) String() string

type TerminateResponse

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

TerminateResponse indicates completion of termination operation(s).

func (*TerminateResponse) Descriptor deprecated

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

Deprecated: Use TerminateResponse.ProtoReflect.Descriptor instead.

func (*TerminateResponse) EnsureValid

func (r *TerminateResponse) EnsureValid() error

EnsureValid verifies that a TerminateResponse is valid.

func (*TerminateResponse) ProtoMessage

func (*TerminateResponse) ProtoMessage()

func (*TerminateResponse) ProtoReflect added in v0.12.0

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

func (*TerminateResponse) Reset

func (x *TerminateResponse) Reset()

func (*TerminateResponse) String

func (x *TerminateResponse) String() string

type UnimplementedForwardingServer added in v0.10.1

type UnimplementedForwardingServer struct {
}

UnimplementedForwardingServer can be embedded to have forward compatible implementations.

func (*UnimplementedForwardingServer) Create added in v0.10.1

func (*UnimplementedForwardingServer) List added in v0.10.1

func (*UnimplementedForwardingServer) Pause added in v0.10.1

func (*UnimplementedForwardingServer) Resume added in v0.10.1

func (*UnimplementedForwardingServer) Terminate added in v0.10.1

Jump to

Keyboard shortcuts

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