Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a snapshot-based cache that maintains a single versioned snapshot of responses per client. Cache consistently replies with the latest snapshot.
func (*Cache) ClearSnapshot ¶
ClearSnapshot clears snapshot for a client. This does not cancel any open watches already created (see ClearStatus).
func (*Cache) ClearStatus ¶
ClearStatus clears status for a client. This has the effect of canceling any open watches opened against this client info.
func (*Cache) SetSnapshot ¶
SetSnapshot updates a snapshot for a client.
func (*Cache) Watch ¶
func (c *Cache) Watch(request *mcp.MeshConfigRequest, responseC chan<- *server.WatchResponse) (*server.WatchResponse, server.CancelWatchFunc)
Watch returns a watch for an MCP request.
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
InMemory Snapshot implementation
func NewInMemory ¶
func NewInMemory() *InMemory
NewInMemory creates a new InMemory snapshot implementation
func (*InMemory) Freeze ¶
func (s *InMemory) Freeze()
Freeze the snapshot, so that it won't get mutated anymore.