connect

package
v0.0.0-...-fb91958 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string `envconfig:"host"`
	Port int    `envconfig:"port" default:"8080"`

	ReadTimeoutSec  int `envconfig:"read_timeout_sec" default:"30"`
	WriteTimeoutSec int `envconfig:"write_timeout_sec" default:"600"`
	IdleTimeoutSec  int `envconfig:"idle_timeout_sec" default:"900"`

	CORSAllowOrigins []string `envconfig:"cors_allow_origins" required:"true"` // e.g. ["http://localhost:3000", "http://localhost:8080"]
}

type Server

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

func NewServer

func NewServer(logger *slog.Logger, conf Config, controller pbconn.Porker2ServiceHandler, session session.Manager, f *interceptor.Factory) *Server

func (*Server) Run

func (s *Server) Run()

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context)

Jump to

Keyboard shortcuts

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