serverguard

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LIMIT_INNER_STATUS = 581
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	apipolicy.BasePolicy
}

func (Policy) CreateDefaultConfig

func (policy Policy) CreateDefaultConfig(ctx map[string]interface{}) apipolicy.PolicyDto

func (Policy) MergeDiceConfig

func (policy Policy) MergeDiceConfig(conf map[string]interface{}) (apipolicy.PolicyDto, error)

func (Policy) NeedSerialUpdate

func (policy Policy) NeedSerialUpdate() bool

func (Policy) ParseConfig

func (policy Policy) ParseConfig(dto apipolicy.PolicyDto, ctx map[string]interface{}) (apipolicy.PolicyConfig, error)

func (Policy) UnmarshalConfig

func (policy Policy) UnmarshalConfig(config []byte) (apipolicy.PolicyDto, error, string)

type PolicyDto

type PolicyDto struct {
	apipolicy.BaseDto
	MaxTps         int64  `json:"maxTps,omitempty"`
	ExtraLatency   int64  `json:"extraLatency,omitempty"`
	RefuseCode     int64  `json:"refuseCode,omitempty"`
	RefuseResponse string `json:"refuseResponse,omitempty"`
}

func (*PolicyDto) AdjustDto

func (dto *PolicyDto) AdjustDto()

func (PolicyDto) IsValidDto

func (dto PolicyDto) IsValidDto() (bool, string)

Jump to

Keyboard shortcuts

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