apis

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: BSD-2-Clause, Unlicense Imports: 11 Imported by: 0

README

Server APIs

This package contains the implementation code for exposing a Blackboard interface.

HTTP

This is currently the only maintained API for the blackboard.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackboardHTTPService

type BlackboardHTTPService struct {
	R *http.ServeMux
	// contains filtered or unexported fields
}

BlackboardHTTPService is an implementation of CoreAPI for HTTP.

func NewBlackboardHTTPService

func NewBlackboardHTTPService(bb blackboards.Blackboard) *BlackboardHTTPService

NewBlackboardHTTPService creates a new BlackboardHTTPService from a Blackboard.

func (*BlackboardHTTPService) BlackboardHandler

func (b *BlackboardHTTPService) BlackboardHandler(w http.ResponseWriter, r *http.Request)

BlackboardHandler is a handler function for the "/blackboard" endpoint.

func (*BlackboardHTTPService) BlackboardLengthHandler

func (b *BlackboardHTTPService) BlackboardLengthHandler(w http.ResponseWriter, r *http.Request)

BlackboardLengthHandler is a handler function for the "/blackboard/len" endpoint.

func (*BlackboardHTTPService) MessageHandler

func (b *BlackboardHTTPService) MessageHandler(w http.ResponseWriter, r *http.Request)

MessageHandler is a handler function for the "/message/{id}" endpoint.

func (*BlackboardHTTPService) NewMessageHandler

func (b *BlackboardHTTPService) NewMessageHandler(w http.ResponseWriter, r *http.Request)

NewMessageHandler is a handler function for the "/message" endpoint.

func (*BlackboardHTTPService) Shutdown

func (b *BlackboardHTTPService) Shutdown() error

Shutdown shuts the blackboard service down.

func (*BlackboardHTTPService) Start

func (b *BlackboardHTTPService) Start(listen_addr string) error

Start is a blocking call to begin listening list_addr.

func (*BlackboardHTTPService) TraceHandler

func (b *BlackboardHTTPService) TraceHandler(w http.ResponseWriter, r *http.Request)

TraceHandler is a handler function for the "/trace" endpoint.

type CoreAPI

type CoreAPI interface {
	Start(listen_addr string) error
	Shutdown() error
}

Jump to

Keyboard shortcuts

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