Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client implementation of the Mesh Configuration Protocol (MCP). It is responsible for the following:
- Maintaining the bidirectional grpc stream with the server. The stream will be reestablished on transient network failures. The provided grpc connection (mcpClient) is assumed to handle (re)dialing the server.
- Handling all aspects of the MCP exchange for the supported message types, e.g. request/response, ACK/NACK, nonce, versioning,
- Decoding the received configuration updates and providing them to the user via a batched set of changes.
func New ¶
func New(mcpClient mcp.AggregatedMeshConfigServiceClient, options *sink.Options) *Client
New creates a new instance of the MCP client for the specified message types.
func (*Client) Collections ¶
Collections returns the collections that this client requests.
func (*Client) Run ¶
Run starts the run loop for request and receiving configuration updates from the server. This function blocks and should typically be run in a goroutine. The client will continue to attempt to re-establish the stream with the server indefinitely. The function exits when the provided context is canceled.
func (*Client) SnapshotRequestInfo ¶
func (c *Client) SnapshotRequestInfo() []sink.RecentRequestInfo
SnapshotRequestInfo returns a snapshot of the last known set of request results.