handlers

package
v0.0.0-...-a134451 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertInternalEventToWatchEvent

func ConvertInternalEventToWatchEvent(in *watch.Event, out *meta.WatchEvent) error

func CreateResource

func CreateResource(s rest.Creater, scope *registry.RequestScope) restful.RouteFunction

func DeleteResource

func DeleteResource(s rest.Deleter, scope *registry.RequestScope) restful.RouteFunction

func GetResource

func GetResource(s rest.Getter, scope *registry.RequestScope) restful.RouteFunction

func IgnoreReceives

func IgnoreReceives(ws *websocket.Conn, timeout time.Duration)

func IsWebSocketRequest

func IsWebSocketRequest(req *http.Request) bool

func ListResource

func ListResource(s rest.Lister, scope *registry.RequestScope) restful.RouteFunction

func PatchResource

func PatchResource(s rest.Patcher, scope *registry.RequestScope) restful.RouteFunction

func UpdateResource

func UpdateResource(s rest.Updater, scope *registry.RequestScope) restful.RouteFunction

func WatchListResource

func WatchListResource(s rest.Watcher, scope *registry.RequestScope) restful.RouteFunction

func WatchResource

func WatchResource(s rest.Watcher, scope *registry.RequestScope) restful.RouteFunction

Types

type TimeoutFactory

type TimeoutFactory interface {
	TimeoutCh() (<-chan time.Time, func() bool)
}

TimeoutFactory abstracts watch timeout logic for testing

type WatchServer

type WatchServer struct {
	Watching        watch.Interface
	Scope           *registry.RequestScope
	MediaType       string
	Framer          runtime.Framer
	Encoder         runtime.Encoder
	EmbeddedEncoder runtime.Encoder
	Fixup           func(runtime.Object) runtime.Object
	TimeoutFactory  TimeoutFactory
}

func (*WatchServer) ServeHTTP

func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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