istio: Index | Files

package source

import ""


Package Files


type CancelWatchFunc Uses

type CancelWatchFunc func()

CancelWatchFunc allows the consumer to cancel a previous watch, terminating the watch for the request.

type PushResponseFunc Uses

type PushResponseFunc func(*WatchResponse)

PushResponseFunc allows the consumer to push a response for the corresponding watch.

type Request Uses

type Request struct {
    Collection string

    // Most recent version was that ACK/NACK'd by the sink
    VersionInfo string
    SinkNode    *mcp.SinkNode

Request is a temporary abstraction for the MCP node request which can be used with the mcp.MeshConfigRequest and mcp.RequestResources. It can be removed once we fully cutover to mcp.RequestResources.

type WatchResponse Uses

type WatchResponse struct {
    Collection string

    // Version of the resources in the response for the given
    // type. The node responses with this version in subsequent
    // requests as an acknowledgment.
    Version string

    // Resourced resources to be included in the response.
    Resources []*mcp.Resource

    // The original request for triggered this response
    Request *Request

WatchResponse contains a versioned collection of pre-serialized resources.

type Watcher Uses

type Watcher interface {
    // Watch returns a new open watch for a non-empty request.
    // Cancel is an optional function to release resources in the
    // producer. It can be called idempotently to cancel and release resources.
    Watch(*Request, PushResponseFunc, string) CancelWatchFunc

Watcher requests watches for configuration resources by node, last applied version, and type. The watch should send the responses when they are ready. The watch can be canceled by the consumer.

Package source imports 1 packages (graph) and is imported by 5 packages. Updated 2020-11-12. Refresh now. Tools for package owners.