webhookserver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package webhookserver provides a local webhook receiver server implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implements the WebhookServer interface.

func NewServer

func NewServer(config ports.WebhookServerConfig) *Server

NewServer creates a new webhook server.

func (*Server) Events

func (s *Server) Events() <-chan *ports.WebhookEvent

Events returns a channel for receiving webhook events.

func (*Server) GetLocalURL

func (s *Server) GetLocalURL() string

GetLocalURL returns the local server URL.

func (*Server) GetPublicURL

func (s *Server) GetPublicURL() string

GetPublicURL returns the public URL (from tunnel, if any).

func (*Server) GetStats

func (s *Server) GetStats() ports.WebhookServerStats

GetStats returns server statistics.

func (*Server) OnEvent

func (s *Server) OnEvent(handler ports.WebhookEventHandler)

OnEvent registers a handler for webhook events.

func (*Server) SetTunnel

func (s *Server) SetTunnel(tunnel ports.Tunnel)

SetTunnel sets the tunnel to use for exposing the server.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the webhook server and optional tunnel.

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the webhook server and tunnel.

Jump to

Keyboard shortcuts

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