Documentation ¶
Index ¶
- type ReloadFunc
- type SendSIPMessage
- type Server
- func (s *Server) BasicAuth(next http.HandlerFunc) http.HandlerFunc
- func (s *Server) Index(w http.ResponseWriter, r *http.Request)
- func (s *Server) Info(w http.ResponseWriter, r *http.Request)
- func (s *Server) ReloadPhonebook(w http.ResponseWriter, r *http.Request)
- func (s *Server) SendMessage(w http.ResponseWriter, r *http.Request)
- func (s *Server) ServePhonebook(w http.ResponseWriter, r *http.Request)
- func (s *Server) ShowConfig(w http.ResponseWriter, r *http.Request)
- func (s *Server) UpdateConfig(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReloadFunc ¶
type SendSIPMessage ¶
type SendSIPMessage func(*data.SIPRequest) (*data.SIPResponse, error)
type Server ¶
type Server struct { Version *data.Version Config *configuration.Config ConfigPath string // optional when using config file Client *http.Client RuntimeInfo *data.RuntimeInfo Records *data.Records Updates *data.Updates Exporters map[string]exporter.Exporter RegisterCache *data.TTLCache[string, *data.SIPClient] ReloadFn ReloadFunc SendSIPMessage SendSIPMessage Tmpls *template.Template }
func NewServer ¶
func NewServer( cfg *configuration.Config, cfgPath string, version *data.Version, records *data.Records, runtimeInfo *data.RuntimeInfo, exporters map[string]exporter.Exporter, updates *data.Updates, refreshRecords ReloadFunc, sendSIPMessage SendSIPMessage, registerCache *data.TTLCache[string, *data.SIPClient], tmpls *template.Template, client *http.Client) *Server
func (*Server) BasicAuth ¶
func (s *Server) BasicAuth(next http.HandlerFunc) http.HandlerFunc
func (*Server) ReloadPhonebook ¶
func (s *Server) ReloadPhonebook(w http.ResponseWriter, r *http.Request)
func (*Server) SendMessage ¶
func (s *Server) SendMessage(w http.ResponseWriter, r *http.Request)
func (*Server) ServePhonebook ¶
func (s *Server) ServePhonebook(w http.ResponseWriter, r *http.Request)
func (*Server) ShowConfig ¶
func (s *Server) ShowConfig(w http.ResponseWriter, r *http.Request)
func (*Server) UpdateConfig ¶
func (s *Server) UpdateConfig(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.