proxy

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DeviceName is the name of the device sent to Hookdeck to help identify the device
	DeviceName string
	// Key is the API key used to authenticate with Hookdeck
	Key              string
	TeamID           string
	TeamMode         string
	URL              *url.URL
	APIBaseURL       string
	DashboardBaseURL string
	ConsoleBaseURL   string
	WSBaseURL        string
	// Indicates whether to print full JSON objects to stdout
	PrintJSON bool
	Log       *log.Logger
	// Force use of unencrypted ws:// protocol instead of wss://
	NoWSS    bool
	Insecure bool
}

Config provides the configuration of a Proxy

type Proxy

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

A Proxy opens a websocket connection with Hookdeck, listens for incoming webhook events, forwards them to the local endpoint and sends the response back to Hookdeck.

func New

func New(cfg *Config, source hookdeck.Source, connections []hookdeck.Connection) *Proxy

New creates a new Proxy

func (*Proxy) Run

func (p *Proxy) Run(parentCtx context.Context) error

Run manages the connection to Hookdeck. The connection is established in phases:

  • Create a new CLI session
  • Create a new websocket connection

Jump to

Keyboard shortcuts

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