server

package module
v0.0.0-...-2bd96ad Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

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

func New

func New(o PluginOptions) *Plugin

func (*Plugin) Init

func (p *Plugin) Init(c *astikit.Closer, f *astiflow.Flow) error

func (*Plugin) ServeAPICatchUp

func (p *Plugin) ServeAPICatchUp() http.Handler

func (*Plugin) ServePush

func (p *Plugin) ServePush() http.Handler

func (*Plugin) ServeWeb

func (p *Plugin) ServeWeb() http.Handler

func (*Plugin) Start

func (p *Plugin) Start(ctx context.Context, tc astikit.TaskCreator)

type PluginAPIOptions

type PluginAPIOptions struct {
	Headers     map[string]string
	QueryParams map[string]string
	URL         string
}

type PluginOptions

type PluginOptions struct {
	Addr        string
	API         PluginAPIOptions
	DeltaPeriod time.Duration
	Push        PluginPushOptions
}

type PluginPushOptions

type PluginPushOptions struct {
	Pusher      Pusher
	QueryParams map[string]string
	URL         string
}

type Pusher

type Pusher interface {
	io.Writer
}

Jump to

Keyboard shortcuts

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