Versions in this module Expand all Collapse all v1 v1.18.2 Nov 11, 2024 Changes in this version + const HeaderContentEncoding + const HeaderContentType + const HeaderGzip + const HeaderJSON + const HeaderKey + const HeaderMetaLen + const HeaderPartCount + const HeaderSep + const HeaderSourceName + func Close() error + func GetHostname(r *http.Request) string + func GetJSONReader(data interface{}, compression int) (r io.Reader, err error) + func GetReqReader(r *http.Request) (io.ReadCloser, error) + func GetRespReader(r *http.Response) (io.ReadCloser, error) + func ListenAndServe(addr string, tlsConf *tls.Config, handler http.Handler) error + func LoadTLSConf(certPath, keyPath, caPath string) (conf *tls.Config, err error) + func TLSConf(cert, key, ca []byte) (conf *tls.Config, err error) + type BandwidthLoggingClient struct + func GetClient(tlsConf *tls.Config, logInterval time.Duration, logPrefix string) (client *BandwidthLoggingClient, err error) + func (blc *BandwidthLoggingClient) Stop() + type Client struct + BandwidthLogInterval time.Duration + Compression int + PartialsDecoder sts.DecodePartials + SourceName string + TLS *tls.Config + TargetHost string + TargetKey string + TargetPort int + TargetPrefix string + Timeout time.Duration + func (c *Client) GetClientConf(clientID string) (conf *sts.ClientConf, err error) + func (c *Client) GetClientStatus(clientID, clientName, clientOS string) (status sts.ClientStatus, err error) + func (c *Client) SetClientConfReceived(clientID string, when time.Time) error + func (c *Client) SetClientState(clientID string, state sts.ClientState) (err error) + func (h *Client) Destroy() + func (h *Client) Recover() (partials []*sts.Partial, err error) + func (h *Client) RecoverTransmission(payload sts.Payload) (n int, err error) + func (h *Client) Transmit(payload sts.Payload) (n int, err error) + func (h *Client) Validate(sent []sts.Pollable) (polled []sts.Polled, err error) + type GracefulServer struct + var DefaultServer *GracefulServer + func NewGracefulServer(srv *http.Server, tlsConf *tls.Config) *GracefulServer + func (s *GracefulServer) Close() error + func (s *GracefulServer) ListenAndServe() error + func (s *GracefulServer) Serve(l net.Listener) error + type Internal struct + Handlers map[string]http.HandlerFunc + Port int + func (s *Internal) Serve(stop <-chan bool, done chan<- bool) + type Server struct + ChanceOfSimulatedFailure float64 + ClientManager sts.ClientManager + Compression int + DecoderFactory sts.PayloadDecoderFactory + GateKeeperFactory sts.GateKeeperFactory + GateKeepers map[string]sts.GateKeeper + Host string + IsValid sts.RequestValidator + PathPrefix string + Port int + ServeDir string + TLS *tls.Config + func (s *Server) Serve(stop <-chan bool, done chan<- bool)