server

package
v0.5.32 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Log *slog.Logger
	// contains filtered or unexported fields
}

func NewServer

func NewServer(addr string, log *slog.Logger, seed int64) *Server

func (*Server) Err

func (s *Server) Err() <-chan error

func (*Server) ServeAsync

func (s *Server) ServeAsync()

func (*Server) Shutdown

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

func (*Server) Stats

func (s *Server) Stats() *Stats

type StatisticBodyResponse

type StatisticBodyResponse struct {
	Code200 map[int64]uint64 `json:"200"`
	Code400 uint64           `json:"400"`
	Code500 uint64           `json:"500"`
}

type StatisticResponse

type StatisticResponse struct {
	Auth StatisticBodyResponse `json:"auth"`
	List StatisticBodyResponse `json:"list"`
	Item StatisticBodyResponse `json:"item"`
}

type Stats

type Stats struct {
	Auth200 map[int64]uint64

	List200 map[int64]uint64

	Order200 map[int64]uint64
	// contains filtered or unexported fields
}

func (*Stats) IncAuth200

func (s *Stats) IncAuth200(userID int64)

func (*Stats) IncAuth400

func (s *Stats) IncAuth400()

func (*Stats) IncAuth500

func (s *Stats) IncAuth500()

func (*Stats) IncList200

func (s *Stats) IncList200(userID int64)

func (*Stats) IncList400

func (s *Stats) IncList400()

func (*Stats) IncList500

func (s *Stats) IncList500()

func (*Stats) IncOrder200

func (s *Stats) IncOrder200(userID int64)

func (*Stats) IncOrder400

func (s *Stats) IncOrder400()

func (*Stats) IncOrder500

func (s *Stats) IncOrder500()

func (*Stats) Reset

func (s *Stats) Reset()

Jump to

Keyboard shortcuts

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