Documentation ¶
Index ¶
- Variables
- func Plugin(outdir string, writer Writer, options ...PluginOptionFn) (api.Plugin, error)
- func Serve(buildOptions api.BuildOptions, options ...PluginOptionFn) (http.Handler, http.Handler, error)
- type FS
- type Notifier
- type PluginOptionFn
- type ServerSentEventHandler
- func (s *ServerSentEventHandler) Broadcast(event, data string)
- func (s *ServerSentEventHandler) NewStream() chan serverSentEvent
- func (s *ServerSentEventHandler) NotifyChanged(updated []string) error
- func (s *ServerSentEventHandler) RemoveStream(stream chan serverSentEvent)
- func (s *ServerSentEventHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFlasherUnsupported = errors.New("the flusher is not supported")
Functions ¶
func Serve ¶
func Serve(buildOptions api.BuildOptions, options ...PluginOptionFn) (http.Handler, http.Handler, error)
Types ¶
type PluginOptionFn ¶
type PluginOptionFn = func(*fsPlugin)
func WithNotifier ¶
func WithNotifier(notifier Notifier) PluginOptionFn
func WithPrefix ¶
func WithPrefix(prefix string) PluginOptionFn
type ServerSentEventHandler ¶
type ServerSentEventHandler struct {
// contains filtered or unexported fields
}
func NewSSE ¶
func NewSSE() *ServerSentEventHandler
func (*ServerSentEventHandler) Broadcast ¶
func (s *ServerSentEventHandler) Broadcast(event, data string)
func (*ServerSentEventHandler) NewStream ¶
func (s *ServerSentEventHandler) NewStream() chan serverSentEvent
func (*ServerSentEventHandler) NotifyChanged ¶
func (s *ServerSentEventHandler) NotifyChanged(updated []string) error
func (*ServerSentEventHandler) RemoveStream ¶
func (s *ServerSentEventHandler) RemoveStream(stream chan serverSentEvent)
func (*ServerSentEventHandler) ServeHTTP ¶
func (s *ServerSentEventHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.