Documentation
¶
Overview ¶
Package srt implements the SRT server: it routes every SRT flow by the stream it names to the endpoint holding the stream and relays it, the stream's encryption untouched. The first flow naming a stream places it on an endpoint of the server's clusters by the load-balancing policy; every later flow naming it, publisher or reader, goes to the same endpoint.
Index ¶
- Variables
- func Resource(sid string) string
- type Server
- func (s *Server) Close(_ bool) error
- func (s *Server) GetConfig() stnrv2.Config
- func (s *Server) Reconcile(conf stnrv2.Config) error
- func (s *Server) Serve(c api.Conn) (api.Conn, api.Verdict, error)
- func (s *Server) Sessions() int
- func (s *Server) Start() error
- func (s *Server) Status() stnrv2.Status
Constants ¶
This section is empty.
Variables ¶
var ( // FlowTimeout is the idle timeout of a relayed flow: SRT peers send keepalives every second // and give up on a peer silent for 5 seconds. FlowTimeout = 10 * time.Second // HandshakeTimeout bounds a caller's handshake, the endpoint's included. HandshakeTimeout = 10 * time.Second // RetryPeriod is how often the server repeats a handshake towards an endpoint that is silent. RetryPeriod = 250 * time.Millisecond // CookiePeriod is how long a SYN cookie is valid: the cookie of the current and of the // previous period are accepted. CookiePeriod = time.Minute )
Functions ¶
Types ¶
type Server ¶
Server is an SRT server object.
func New ¶
func New(conf *stnrv2.ServerConfig, rt *objruntime.Runtime) (*Server, error)
New creates the SRT server of a validated config.
func (*Server) Reconcile ¶
Reconcile applies the spec, the linger period and the load-balancing policy to the next flows.