Documentation
¶
Index ¶
- func DefaultGetter(apiOp *types.APIRequest) *types.APISchemas
- func Handler(apiOp *types.APIRequest, getter SchemasGetter, serverVersion string) (types.APIObjectList, error)
- func MarshallObject(apiOp *types.APIRequest, getter SchemasGetter, event types.APIEvent) types.APIEvent
- func NewHandler(getter SchemasGetter, serverVersion string) types.RequestListHandler
- func Register(schemas *types.APISchemas, getter SchemasGetter, serverVersion string)
- type Converter
- type DebouncerState
- type SchemasGetter
- type Subscribe
- type SubscriptionMode
- type WatchSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultGetter ¶
func DefaultGetter(apiOp *types.APIRequest) *types.APISchemas
func Handler ¶
func Handler(apiOp *types.APIRequest, getter SchemasGetter, serverVersion string) (types.APIObjectList, error)
func MarshallObject ¶
func MarshallObject(apiOp *types.APIRequest, getter SchemasGetter, event types.APIEvent) types.APIEvent
func NewHandler ¶
func NewHandler(getter SchemasGetter, serverVersion string) types.RequestListHandler
func Register ¶
func Register(schemas *types.APISchemas, getter SchemasGetter, serverVersion string)
Types ¶
type Converter ¶
type Converter struct {
writer.EncodingResponseWriter
// contains filtered or unexported fields
}
type DebouncerState ¶ added in v0.6.1
type DebouncerState int
const ( // The first notification is always sent right away, no need to wait FirstNotification DebouncerState = iota TimerStarted TimerStopped )
type SchemasGetter ¶
type SchemasGetter func(apiOp *types.APIRequest) *types.APISchemas
type Subscribe ¶
type Subscribe struct {
Mode SubscriptionMode `json:"mode,omitempty"`
Stop bool `json:"stop,omitempty"`
ResourceType string `json:"resourceType,omitempty"`
ResourceVersion string `json:"resourceVersion,omitempty"`
Namespace string `json:"namespace,omitempty"`
ID string `json:"id,omitempty"`
Selector string `json:"selector,omitempty"`
// DebounceMs will debounce events when Mode is SubscriptionModeNotification. Unused for other Mode values.
DebounceMs int `json:"debounceMs,omitempty"`
}
type SubscriptionMode ¶ added in v0.6.1
type SubscriptionMode string
const ( // SubscriptionModeDefault tells the subscription to return the events // as they come in with the object embedded inside SubscriptionModeDefault SubscriptionMode = "" // SubscriptionModeNotification tells the subscription to return a notification event // whenever an event comes in. The consumer is expected to then make another list request // to get the latest data. SubscriptionModeNotification SubscriptionMode = "resource.changes" )
type WatchSession ¶
func NewWatchSession ¶
func NewWatchSession(apiOp *types.APIRequest, getter SchemasGetter) *WatchSession
func (*WatchSession) Close ¶
func (s *WatchSession) Close()
Click to show internal directories.
Click to hide internal directories.