pullapi

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer func(r *http.Request) bool

func BearerTokenAuthorizer

func BearerTokenAuthorizer(tokens [][]byte) Authorizer

type Handler

type Handler interface {
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

type Server

type Server struct {
	Store           queue.Store
	Target          string
	ResolveRoute    func(endpoint string) (route string, ok bool)
	Authorize       Authorizer
	ObserveDequeue  func(route string, statusCode int, items []queue.Envelope)
	ObserveAck      func(route string, statusCode int, leaseID string, leaseExpired bool)
	ObserveNack     func(route string, statusCode int, leaseID string, leaseExpired bool)
	ObserveExtend   func(route string, statusCode int, leaseID string, extendBy time.Duration, leaseExpired bool)
	DefaultLeaseTTL time.Duration
	MaxBatch        int
	MaxLeaseTTL     time.Duration
	DefaultMaxWait  time.Duration
	MaxWait         time.Duration
}

func NewServer

func NewServer(store queue.Store) *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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