listener

package
v0.0.71 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSessionDisconnected = errors.New("session disconnected")
	ErrConnectNotDone      = errors.New("CONNECT not done")
)
View Source
var CONNECT_DEADLINE int32 = 15
View Source
var (
	ErrSessionNotFound = errors.New("session not found on this endpoint")
)

Functions

func New

func New(id string, logger *zap.Logger, mesh cluster.Mesh, config Config) *endpoint

func SigningKey added in v0.0.71

func SigningKey() string

Types

type Config

type Config struct {
	TCPPort       int
	TLSCommonName string
	TLSPort       int
	WSSPort       int
	WSPort        int
}

type DeadlineSetter added in v0.0.71

type DeadlineSetter interface {
	SetDeadline(time.Time) error
}

type Endpoint

type Endpoint interface {
	Publish(ctx context.Context, id string, publish *packet.Publish) error
	CloseSession(context.Context, string) error
	Close() error
}

type QueuesStore added in v0.0.69

type QueuesStore interface {
	StreamMessages(ctx context.Context, id string, f func(uint64, *packet.Publish) error) error
	AckMessage(ctx context.Context, id string, ackOffset uint64) error
}

type Token added in v0.0.71

type Token struct {
	SessionID     string `json:"session_id"`
	SessionTenant string `json:"session_tenant"`
	jwt.StandardClaims
}

func DecodeSessionToken added in v0.0.71

func DecodeSessionToken(signKey string, signedToken string) (Token, error)

Jump to

Keyboard shortcuts

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