internal

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode[T any](
	ctx context.Context,
	r io.ReadCloser,
	logs chan<- T,
	decodeNext func(d *json.Decoder) (T, error),
) error

Types

type Extension

type Extension[T any] struct {
	// contains filtered or unexported fields
}

func NewExtension

func NewExtension[T any](
	ctx context.Context,
	proc eventProcessor[T],
	destinationAddr string,
	log logr.Logger,
	decoder decoder[T],
	subscriber subscriber,
) *Extension[T]

func (*Extension[T]) Err

func (ext *Extension[T]) Err() <-chan error

func (*Extension[T]) HandleInvokeEvent

func (ext *Extension[T]) HandleInvokeEvent(ctx context.Context, event *extapi.NextEventResponse) error

func (*Extension[T]) Init

func (ext *Extension[T]) Init(ctx context.Context, client *extapi.Client) error

func (*Extension[T]) ServeHTTP

func (ext *Extension[T]) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Extension[T]) Shutdown

func (ext *Extension[T]) Shutdown(ctx context.Context, reason extapi.ShutdownReason, err error) error

Jump to

Keyboard shortcuts

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