broker

package
v0.0.0-...-c116fac Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToOrigin

func ConnectToOrigin(ctx context.Context, brokerUrl, prefix, originName string) (conn net.Conn, err error)

Given an origin's broker URL, return a connected socket to the origin

func LaunchNamespaceKeyMaintenance

func LaunchNamespaceKeyMaintenance(ctx context.Context, egrp *errgroup.Group)

Launches a background goroutine that periodically expires the namespace key cache

func LaunchRequestMonitor

func LaunchRequestMonitor(ctx context.Context, egrp *errgroup.Group, resultChan chan any) (err error)

Launch a goroutine that polls the broker endpoint for reversal requests The returned channel will produce listeners that are "one shot"; it's a TLS listener where you can invoke "Accept" once before it automatically closes itself. It is the result of a successful connection reversal to a cache.

func RegisterBroker

func RegisterBroker(ctx context.Context, router *gin.RouterGroup)

func RegisterBrokerCallback

func RegisterBrokerCallback(ctx context.Context, router *gin.RouterGroup)

Register the HTTP handlers for the callback to a cache

Types

This section is empty.

Jump to

Keyboard shortcuts

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