stream

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRawStreamWithContext

func GetRawStreamWithContext(ctx context.Context) (stream.Stream, bool)

func NewServerWithConfig

func NewServerWithConfig(conf *Config) (service.Service, error)

Types

type Config

type Config struct {
	Listener          stream.ListenConfig
	Handler           stream.Handler
	DisconnectOnClose bool `json:",omitempty"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(listenConfig stream.ListenConfig, handler stream.Handler, disconnectOnClose bool) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

func (*Server) ServeStream

func (s *Server) ServeStream(ctx context.Context, stm stream.Stream)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL