Documentation ¶
Index ¶
Examples ¶
Constants ¶
const ( KIgnorePortRegExp = "^(.*?):[0-9]+$" KLoadBalanceRoundRobin = "roundRobin" KLoadBalanceRandom = "random" KLoadBalanceExecutionTime = "lowTimeResponse" KLoadBalanceExecutionTimeAverage = "lowTimeResponseAverage" KHeaderTypeString = "string" KHeaderTypeRegExp = "regExp" )
const KListMaxLength = 50
Variables ¶
This section is empty.
Functions ¶
func ConfigCertificates ¶
func HandleCriticalError ¶
func HandleCriticalError(err error)
func NewServerStruct ¶
Types ¶
type Analytics ¶
type Analytics struct { NumberCurrentExecutions int64 ExecutionSuccessDurationMax time.Duration ExecutionSuccessDurationMin time.Duration ExecutionDurationEntireList []executionInfo ExecutionDurationSuccessList []executionInfo ExecutionDurationErrorList []executionInfo ExecutionDurationSuccessAverage time.Duration ConsecutiveErrors int ConsecutiveSuccess int TotalErrorsCounter int TotalSuccessCounter int LastRoundError bool // contains filtered or unexported fields }
bt_br: Struct com a funcionalidade de registrar contadores e temporizadores em eventos de fim de execução, tanto para eventos com sucesso ou erro. en: A Struct that has the functionality of register, counters and timers, in the event of the end of the run, for both events, with a success or an error.
func NewAnalytics ¶
func NewAnalytics() Analytics
pt_br: Prepara o struct do tipo AnalyticsCheck para ser usado en: Mounts a struct type AnalyticsCheck for a correct use
func (*Analytics) GetLastRoundError ¶
func (*Analytics) OnExecutionEndWithError ¶
func (el *Analytics) OnExecutionEndWithError()
bt_br: Esta função deve ser chamada ao final de uma execução com erro en: This function should be called at the end of the run with an error
func (*Analytics) OnExecutionEndWithSuccess ¶
func (el *Analytics) OnExecutionEndWithSuccess()
pt_br: Esta função deve deve ser chamada ao final de uma execução com sucesso en: This function must be called at the end of a successful execution
func (*Analytics) OnExecutionStart ¶
func (el *Analytics) OnExecutionStart()
bt_br: Esta função deve ser chamada antes do início do servidor correspondente a rota do proxy reverso en: This function must be called prior to the start of the server for correspondent route in the reverse proxy
Example ¶
a := Analytics{} // before execution start fmt.Printf("NumberCurrentExecutions: %v\n", a.NumberCurrentExecutions) fmt.Printf("timeOnStarEvent equals to 0: %v\n", a.timeOnStarEvent.UnixNano()) a.OnExecutionStart() fmt.Printf("NumberCurrentExecutions: %v\n", a.NumberCurrentExecutions) fmt.Printf("timeOnStarEvent greater than 0: %v\n", a.timeOnStarEvent.UnixNano() > 0)
Output: NumberCurrentExecutions: 0 timeOnStarEvent equals to 0: -6795364578871345152 NumberCurrentExecutions: 1 timeOnStarEvent greater than 0: true
type DebugLogger ¶
type DebugLogger struct{}
type Listen ¶
type Listen struct { InProtocol string `yaml:"inProtocol" json:"inProtocol"` InAddress string `yaml:"inAddress" json:"inAddress"` OutProtocol string `yaml:"outProtocol" json:"outProtocol"` OutAddress string `yaml:"outAddress" json:"outAddress"` Pygocentrus pygocentrus `yaml:"pygocentrus" json:"pygocentrus"` // contains filtered or unexported fields }
type ListenAndServer ¶
type ListenAndServer struct { // Example: 8081 InAddress string `yaml:"inAddress" json:"inAddress"` }
type MainConfig ¶
type MainConfig struct { Version float64 `yaml:"version" json:"version"` AffluentRiver map[string]Project `yaml:"capibaribe" json:"capibaribe"` // contains filtered or unexported fields }
func (*MainConfig) LoadConfAndStart ¶
func (el *MainConfig) LoadConfAndStart(filePath string)
func (*MainConfig) Unmarshal ¶
func (el *MainConfig) Unmarshal(filePath string) error
func (*MainConfig) UnmarshalByte ¶
func (el *MainConfig) UnmarshalByte(fileContent []byte) error
func (*MainConfig) Wait ¶
func (el *MainConfig) Wait()
func (*MainConfig) WaitAddDelta ¶
func (el *MainConfig) WaitAddDelta()
func (*MainConfig) WaitDone ¶
func (el *MainConfig) WaitDone()
type Project ¶
type Project struct { ListenAndServer ListenAndServer `yaml:"listenAndServer" json:"listenAndServer"` Sll ssl `yaml:"ssl" json:"ssl"` Proxy []proxy `yaml:"proxy" json:"proxy"` DebugServerEnable bool `yaml:"debugServerEnable" json:"debugServerEnable"` HealthCheck healthCheck `yaml:"healthCheck" json:"healthCheck"` AnalyticsCheck analyticsCheck `yaml:"analyticsCheck" json:"analyticsCheck"` Listen Listen `yaml:"-" json:"-"` // contains filtered or unexported fields }
func (*Project) HandleFunc ¶
func (el *Project) HandleFunc(w http.ResponseWriter, r *http.Request)
func (*Project) WaitAddDelta ¶
func (el *Project) WaitAddDelta()
Source Files ¶
- analyticsCheck.go
- configCertificates.go
- consts.go
- errors.go
- inLineRandFunc.go
- newAnalytics.go
- rateMaxMin.go
- ssl.go
- typeAnalytic.go
- typeBind.go
- typeChangeContent.go
- typeChangeHeaders.go
- typeExecutionInfo.go
- typeHeader.go
- typeHealthCheck.go
- typeListen.go
- typeListenAndServer.go
- typeMainConfig.go
- typeMatch.go
- typeMaxMin.go
- typeNativeGoTransport.go
- typeNativeHttpDebugger.go
- typeProject.go
- typeProxy.go
- typePygocentrus.go
- typeServers.go
- typeStatus.go
- typeTransport.go