apiserver

package
v1.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PullInterval    = time.Hour * 2
	PushInterval    = time.Second * 30
	MetricsInterval = time.Minute * 30
)
View Source
var SCOPE_CAPI string = "CAPI"
View Source
var SCOPE_CAPI_ALIAS string = "crowdsecurity/community-blocklist" //we don't use "CAPI" directly, to make it less confusing for the user
View Source
var SCOPE_LISTS string = "lists"

Functions

func CustomRecoveryWithWriter added in v1.0.12

func CustomRecoveryWithWriter() gin.HandlerFunc

RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.

func NewAPIC

func NewAPIC(config *csconfig.OnlineApiClientCfg, dbClient *database.Client, consoleConfig *csconfig.ConsoleConfig) (*apic, error)

Types

type APIServer

type APIServer struct {
	URL string
	TLS *csconfig.TLSCfg
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config *csconfig.LocalApiServerCfg) (*APIServer, error)

func (*APIServer) AttachPluginBroker added in v1.2.0

func (s *APIServer) AttachPluginBroker(broker *csplugin.PluginBroker)

func (*APIServer) Close

func (s *APIServer) Close()

func (*APIServer) GetTLSConfig added in v1.4.0

func (s *APIServer) GetTLSConfig() (*tls.Config, error)

func (*APIServer) InitController added in v1.2.0

func (s *APIServer) InitController() error

func (*APIServer) Router

func (s *APIServer) Router() (*gin.Engine, error)

func (*APIServer) Run

func (s *APIServer) Run() error

func (*APIServer) Shutdown

func (s *APIServer) Shutdown() error

Directories

Path Synopsis
v1
middlewares
v1

Jump to

Keyboard shortcuts

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