Skip to content

Instantly share code, notes, and snippets.

@nest-don
Created December 5, 2018 16:05
Show Gist options
  • Save nest-don/571843f091537fe11cfc73030294dc1f to your computer and use it in GitHub Desktop.
Save nest-don/571843f091537fe11cfc73030294dc1f to your computer and use it in GitHub Desktop.
public SearchController(
ILogger<SearchController> logger,
Runtime runtime
)
{
_logger = logger;
_runtime = runtime;
_cache = _runtime.QueueClient.CreateRPCEndpoint(
_runtime.GetNest("cache"));
_cache.TimedOut += CacheTimedOutHandler;
}
private void CacheTimedOutHandler(object sender, EventArgs e)
{
_logger.LogError("Cache timeout");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment