runtime

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReqStatus = "status"
	ReqStop   = "stop"
	RespErr   = "error"
	Response  = "response"
)

Variables

View Source
var (
	ErrFree    = fmt.Errorf("target is free")
	ErrTimeout = fmt.Errorf("runtime pipeline target timeout")
)

Functions

This section is empty.

Types

type Event

type Event struct {
	Type string `json:"type"`
	Data string `json:"data"`
}

type EventHandler

type EventHandler func(server *RuntimeServer, event *Event)

type RuntimeClient

type RuntimeClient struct {
	Path string
	// contains filtered or unexported fields
}

func NewRuntimeClient

func NewRuntimeClient(path string) *RuntimeClient

func (*RuntimeClient) Request

func (c *RuntimeClient) Request(reqtype string) (resp string, err error)

func (*RuntimeClient) Write

func (c *RuntimeClient) Write(event *Event)

type RuntimeServer

type RuntimeServer struct {
	Path        string
	HandlerFunc EventHandler
	// contains filtered or unexported fields
}

func NewRuntimeServer

func NewRuntimeServer(path string, handlerFunc EventHandler) *RuntimeServer

func (*RuntimeServer) Serve

func (s *RuntimeServer) Serve()

func (*RuntimeServer) Shutdown

func (s *RuntimeServer) Shutdown() error

func (*RuntimeServer) Write

func (s *RuntimeServer) Write(event *Event)

Jump to

Keyboard shortcuts

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