Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LogLevel is a log level. LogLevel zapcore.Level // Listen is an address to listen. // It is must be host:port or unix:/path/of/sock . Listen string // ConfigFilePath is a path to the configuration file. ConfigFilePath string )
Functions ¶
This section is empty.
Types ¶
type FileContent ¶
type FileContent struct { Strategy Strategy TokenBucket tokenBucketConfig }
FileContent is a content of config file.
func LoadFile ¶
func LoadFile(path string) (*FileContent, error)
type Strategy ¶
type Strategy int32
Strategy is an enumeration of token bucket strategies. ENUM( time-slice timestamp )
func ParseStrategy ¶
ParseStrategy attempts to convert a string to a Strategy
func (*Strategy) MarshalText ¶
MarshalText implements the text marshaller method
func (*Strategy) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method
Click to show internal directories.
Click to hide internal directories.