Documentation
¶
Index ¶
- Constants
- Variables
- func InitLogger(config *Config) error
- func NewLogger(config *Config, logFilename string, logDomain string) (*zerolog.Logger, error)
- type Config
- type Metrics
- func (m *Metrics) IncAuthnWebhookCnt(code, method, host, url string, allowed bool, reason string)
- func (m *Metrics) IncWebhookReqCnt(code, method, host, url string)
- func (m *Metrics) ObserveWebhookReqDur(code, method, host, url string, elapsed float64)
- func (m *Metrics) ObserveWebhookReqSz(code, method, host, url string, sz int64)
- func (m *Metrics) ObserveWebhookResSz(code, method, host, url string, sz int64)
- type Server
Constants ¶
View Source
const ( KB = prometheus.KB MB = prometheus.MB MetricsKey = "webhook_metrics" )
Variables ¶
View Source
var Version string
Functions ¶
func InitLogger ¶
Types ¶
type Config ¶
type Config struct {
Debug bool `ini:"debug"`
LogDir string `ini:"log_dir"`
LogName string `ini:"log_name"`
LogStdout bool `ini:"log_stdout"`
LogRotateMaxSize int `ini:"log_rotate_max_size"`
LogRotateMaxBackups int `ini:"log_rotate_max_backups"`
LogRotateMaxAge int `ini:"log_rotate_max_age"`
LogRotateCompress bool `ini:"log_rotate_compress"`
LogMessageKeyName string `ini:"log_message_key_name"`
LogTimestampKeyName string `ini:"log_timestamp_key_name"`
SignalingLogName string `ini:"signaling_log_name"`
SignalingLogFilters []string `ini:"signaling_log_filters"`
DebugConsoleLog bool `ini:"debug_console_log"`
DebugConsoleLogJSON bool `ini:"debug_console_log_json"`
TypeMessage bool `ini:"type_message"`
ListenIPv4Address string `ini:"listen_ipv4_address"`
ListenPortNumber int32 `ini:"listen_port_number"`
// socket の待ち受け時間
WebSocketReadTimeoutSec int32 `ini:"websocket_read_timeout_sec"`
// pong が送られてこないためタイムアウトにするまでの時間
WebSocketPongTimeoutSec int32 `ini:"websocket_pong_timeout_sec"`
// ping 送信の時間間隔
WebSocketPingIntervalSec int32 `ini:"websocket_ping_interval_sec"`
// シグナリングからコピーする WebSocket の HTTP ヘッダー名
CopyWebSocketHeaderNames []string `ini:"copy_websocket_header_names"`
AuthnWebhookURL string `ini:"authn_webhook_url"`
DisconnectWebhookURL string `ini:"disconnect_webhook_url"`
WebhookLogName string `ini:"webhook_log_name"`
WebhookRequestTimeoutSec int32 `ini:"webhook_request_timeout_sec"`
ListenPrometheusIPv4Address string `ini:"listen_prometheus_ipv4_address"`
ListenPrometheusPortNumber int32 `ini:"listen_prometheus_port_number"`
}
func (*Config) PrintConfig ¶
func (c *Config) PrintConfig()
type Metrics ¶
type Metrics struct {
WebhookReqCnt *prometheus.Metric
WebhookReqDur *prometheus.Metric
WebhookResSz *prometheus.Metric
WebhookReqSz *prometheus.Metric
AuthnWebhookCnt *prometheus.Metric
}
func NewMetrics ¶
func NewMetrics() *Metrics
func (*Metrics) IncAuthnWebhookCnt ¶
func (*Metrics) IncWebhookReqCnt ¶
func (*Metrics) ObserveWebhookReqDur ¶
func (*Metrics) ObserveWebhookReqSz ¶
func (*Metrics) ObserveWebhookResSz ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.