server

package module
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: Apache-2.0 Imports: 2 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPMiddleware added in v1.5.0

type HTTPMiddleware interface {
	// Return a http handler with middleware as the parent handler
	HandleFunc(http.HandlerFunc) http.HandlerFunc
}

type HTTPRouter added in v1.5.0

type HTTPRouter interface {
	// Return the CORS origin
	Origin() string

	// Register a function to handle a URL path
	HandleFunc(context.Context, string, http.HandlerFunc)
}

type Logger

type Logger interface {

	// Emit an informational message
	Print(context.Context, ...any)
}

type Plugin

type Plugin interface {
	// Return the unique name for the plugin
	Name() string

	// Return a description of the plugin
	Description() string

	// Create a task from a plugin
	New(context.Context) (Task, error)
}

Plugin represents a service

type Provider

type Provider interface {
	Task

	// Return a task given a plugin label
	Task(context.Context, string) Task
}

Provider represents a service provider

type Task added in v1.0.48

type Task interface {
	// Run a task
	Run(context.Context) error
}

Task represents a service task

Directories

Path Synopsis
cmd
server command
pkg
plugin

Jump to

Keyboard shortcuts

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