api

package
v0.0.0-...-0940e79 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func (*API) Init

func (a *API) Init(ctx context.Context) (*gobs.ServiceLifeCycle, error)

func (*API) Setup

func (a *API) Setup(ctx context.Context, deps ...gobs.IService) error

func (*API) StartServer

func (a *API) StartServer(ctx context.Context, onReady func(err error)) error

func (*API) Stop

func (a *API) Stop(ctx context.Context) error

type APIConfig

type APIConfig struct {
	AllowOrigins string `env:"ALLOW_ORIGINS" mapstructure:"ALLOW_ORIGINS" envDefault:"*"`
	AllowHeaders string `env:"ALLOW_HEADERS" mapstructure:"ALLOW_HEADERS" envDefault:"*"`

	IdleTimeout      int `env:"IDLE_TIMEOUT" mapstructure:"IDLE_TIMEOUT" envDefault:"10"`
	MaxConcurrent    int `env:"MAX_CONCURRENT" mapstructure:"MAX_CONCURRENT" envDefault:"1000"`
	MaxReadFrameSize int `env:"MAX_READ_FRAME_SIZE" mapstructure:"MAX_READ_FRAME_SIZE" envDefault:"1048576"`
	Port             int `env:"PORT" mapstructure:"PORT" envDefault:"8080"`
}

Directories

Path Synopsis
handler

Jump to

Keyboard shortcuts

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