connection

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizeConnectionService

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

func NewAuthorizeConnectionService

func NewAuthorizeConnectionService(codec app.Decoder, authorizer app.RequestAuthorizer, logger app.Logger) *AuthorizeConnectionService

func (*AuthorizeConnectionService) Authorize

func (session *AuthorizeConnectionService) Authorize(ctx context.Context, connection Connection) (time.Duration, error)

type Closer

type Closer interface {
	Close(context.Context) error
}

type Connection

type Connection interface {
	Reader
	Writer
	Closer
}

type ConnectionAuthorizer

type ConnectionAuthorizer interface {
	Authorize(context.Context, Connection) (time.Duration, error)
}

type ConnectionService

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

func NewConnectionService

func NewConnectionService(dialer Dialer, connection_authorizer ConnectionAuthorizer, subprotocol_generator SubprotocolGenerator, logger app.Logger) *ConnectionService

func (*ConnectionService) Connect

type CreateConnectionInput

type CreateConnectionInput struct {
	Url          *url.URL
	Subprotocols []string
}

type CreateConnectionOutput

type CreateConnectionOutput struct {
	Connection Connection
	Timeout    time.Duration
}

type DialOptions

type DialOptions struct {
	Url          *url.URL
	Subprotocols []string
}

type Dialer

type Dialer interface {
	Dial(context.Context, DialOptions) (Connection, error)
}

type GenerateSubprotocolService

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

func NewGenerateSubprotocolService

func NewGenerateSubprotocolService(authorizer app.RequestAuthorizer, serializer Serializer) *GenerateSubprotocolService

func (*GenerateSubprotocolService) Generate

func (service *GenerateSubprotocolService) Generate(ctx context.Context) (string, error)

type Reader

type Reader interface {
	Read(context.Context) ([]byte, error)
}

type Runtime

type Runtime interface {
	Close(context.Context) error
}

type Serializer

type Serializer interface {
	Serialize(app.Signature) (string, error)
}

type SubprotocolGenerator

type SubprotocolGenerator interface {
	Generate(context.Context) (string, error)
}

type Transport

type Transport interface {
	Close(context.Context) error
}

type Writer

type Writer interface {
	Write(context.Context, []byte) error
}

Jump to

Keyboard shortcuts

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