server

package
v1.20.15 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter() *gin.Engine

Types

type CountStorage added in v1.20.13

type CountStorage interface {
	Store(*_types.Count) error
}

type GrpcServer added in v1.20.13

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

func NewGrpcServer added in v1.20.13

func NewGrpcServer(addr string, ch chan<- *LogPackageMeta) (*GrpcServer, error)

func (*GrpcServer) Listen added in v1.20.13

func (s *GrpcServer) Listen() error

func (*GrpcServer) Stop added in v1.20.13

func (s *GrpcServer) Stop() error

type HttpServer added in v1.20.13

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

func NewHttpServer added in v1.20.13

func NewHttpServer(addr string) (*HttpServer, error)

func (*HttpServer) Listen added in v1.20.13

func (srv *HttpServer) Listen() error

func (*HttpServer) Stop added in v1.20.13

func (srv *HttpServer) Stop() error

type LogPackageMeta added in v1.20.13

type LogPackageMeta struct {
	*_types.LogPackage
	Protocol string
	Size     int
}

type LogServer added in v1.20.13

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

func NewLogServer added in v1.20.13

func NewLogServer(
	httpaddr string,
	udpAddr string,
	grpcAddr string,
	logStorage LogStorage,
	countStorage CountStorage,
) (result *LogServer, err error)

func (*LogServer) Run added in v1.20.13

func (srv *LogServer) Run()

func (*LogServer) Stop added in v1.20.13

func (srv *LogServer) Stop()

type LogStorage added in v1.20.13

type LogStorage interface {
	Store(*_types.Log) error
}

type SiteVerifyResponse added in v1.0.9

type SiteVerifyResponse struct {
	Success     bool      `json:"success"`
	Score       float64   `json:"score"`
	Action      string    `json:"action"`
	ChallengeTS time.Time `json:"challenge_ts"`
	Hostname    string    `json:"hostname"`
	ErrorCodes  []string  `json:"error-codes"`
}

func CheckRecaptcha added in v1.0.9

func CheckRecaptcha(secret, response string) (*SiteVerifyResponse, error)

type UdpServer added in v1.20.13

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

func NewUdpServer added in v1.20.13

func NewUdpServer(addr string, ch chan<- *LogPackageMeta) (*UdpServer, error)

func (*UdpServer) Listen added in v1.20.13

func (srv *UdpServer) Listen()

func (*UdpServer) Stop added in v1.20.13

func (srv *UdpServer) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳