make_directory_service (src/server.rs)

gears-rust · gears/system/service-discovery/src/server.rs · rust · Apache-2.0
auth, Auth / Identity

gRPC server for Directory Service, handling instance registration, lookup, and authorization.

// Source: https://github.com/constructorfabric/gears-rust | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! gRPC server implementation for `DirectoryService`
//!
//! This gear provides the gRPC service implementation for Directory Service.

use std::sync::Arc;

use tonic::{Extensions, Request, Response, Status};

use cf_system_sdks::directory::labels::is_valid_label_segment;
use cf_system_sdks::directory::{
    DeregisterInstanceRequest, DirectoryClient, DirectoryInvalidArgument, DirectoryNotFound,
    DirectoryService, DirectoryServiceNameConflict, DirectoryServiceServer, GetOpenApiSpecRequest,
    GetOpenApiSpecResponse, HeartbeatRequest, InstanceInfo, InstanceState, LabelSel

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key