api

package
v0.9.1-rc5 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package api contains the webserver for API and SSE subscription

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServerConfig

type HTTPServerConfig struct {
	ListenAddr string
	Log        *zap.SugaredLogger

	EnablePprof bool // https://go-chi.io/#/pages/middleware?id=profiler

	DrainDuration            time.Duration
	GracefulShutdownDuration time.Duration
	ReadTimeout              time.Duration
	WriteTimeout             time.Duration
}

type SSESubscription

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

type Server

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

func New

func New(cfg *HTTPServerConfig) (srv *Server)

func (*Server) RunInBackground

func (s *Server) RunInBackground()

func (*Server) SendTx

func (s *Server) SendTx(ctx context.Context, tx *common.TxIn) error

func (*Server) Shutdown

func (s *Server) Shutdown()

Jump to

Keyboard shortcuts

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