{"modulePath":"github.com/hookdeck/hookdeck-cli","version":"v1.0.4","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package proxy\n\n## Types\n\n```go\ntype Config struct {\n\t// DeviceName is the name of the device sent to Hookdeck to help identify the device\n\tDeviceName string\n\t// Key is the API key used to authenticate with Hookdeck\n\tKey              string\n\tProjectID        string\n\tProjectMode      string\n\tURL              *url.URL\n\tAPIBaseURL       string\n\tDashboardBaseURL string\n\tConsoleBaseURL   string\n\tWSBaseURL        string\n\t// Indicates whether to print full JSON objects to stdout\n\tPrintJSON bool\n\tLog       *log.Logger\n\t// Force use of unencrypted ws:// protocol instead of wss://\n\tNoWSS    bool\n\tInsecure bool\n\t// MaxConnections allows tuning the maximum concurrent connections per host.\n\t// Default: 50 concurrent connections\n\t// This can be increased for high-volume testing scenarios where the local\n\t// endpoint can handle more concurrent requests.\n\t// Example: Set to 100+ when load testing with many parallel webhooks.\n\t// Warning: Setting this too high may cause resource exhaustion.\n\tMaxConnections int\n}\n```\nConfig provides the configuration of a Proxy\n\n```go\ntype Proxy struct {\n\t// contains filtered or unexported fields\n}\n```\nA 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.\n\n```go\nfunc New(cfg *Config, connections []*hookdecksdk.Connection) *Proxy\n```\nNew creates a new Proxy\n\n```go\nfunc (p *Proxy) Run(parentCtx context.Context) error\n```\nRun manages the connection to Hookdeck. The connection is established in phases:\n\n  - Create a new CLI session\n  - Create a new websocket connection\n\n","path":"github.com/hookdeck/hookdeck-cli/pkg/proxy","name":"proxy","synopsis":"","isRedistributable":true}
