NATS C Client with JetStream and Streaming support  3.8.0
The nats.io C Client, Supported by Synadia Communications Inc.
Loading...
Searching...
No Matches

Typedefs

typedef struct micro_client_s microClient
 The Microservice client.
 
typedef struct __for_forward_compatibility_only microClientConfig
 The Microservice configuration object. For forward compatibility only.
 
typedef struct micro_endpoint_s microEndpoint
 microEndpoint represents a microservice endpoint.
 
typedef struct micro_endpoint_config_s microEndpointConfig
 The Microservice endpoint configuration object.
 
typedef struct micro_endpoint_info_s microEndpointInfo
 static information about an endpoint.
 
typedef struct micro_endpoint_stats_s microEndpointStats
 The Microservice endpoint-level stats struct.
 
typedef struct micro_error_s microError
 the Microservice error object.
 
typedef struct micro_group_s microGroup
 a collection of endpoints and other groups, with a common prefix to their subjects and names.
 
typedef struct micro_request_s microRequest
 a request received by a microservice endpoint.
 
typedef struct micro_service_s microService
 the main object for a configured microservice.
 
typedef struct micro_service_config_s microServiceConfig
 The microservice configuration object.
 
typedef struct micro_service_info_s microServiceInfo
 Information about a running microservice.
 
typedef struct micro_service_stats_s microServiceStats
 The Microservice service-level stats struct.
 

Detailed Description

Microservice types.

Typedef Documentation

◆ microClient

typedef struct micro_client_s microClient

Initialize with micro_NewClient and destroy with microClient_Destroy.

See also
micro_NewClient, microClient_Destroy

◆ microClientConfig

typedef struct __for_forward_compatibility_only microClientConfig

◆ microEndpoint

typedef struct micro_endpoint_s microEndpoint

The only place where this struct is used by the user is in callbacks, to identify which endpoint was called, or caused an error.

See also
microRequestHandler, microErrorHandler, microServiceConfig, microEndpointConfig

◆ microEndpointConfig

◆ microEndpointInfo

microEndpointInfo is returned by microService_GetInfo function, as part of microServiceInfo. It is also accessible by sending a $SRV.INFO.<service-name>[.<id>] request to the service. See micro_endpoint_info_s for descriptions of the fields.

See also
micro_endpoint_info_s, micro_service_info_s, microService_GetInfo

◆ microEndpointStats

Returned as part of microEndpointStats. See micro_endpoint_stats_s for descriptions of the fields.

See also
micro_endpoint_stats_s, microServiceStats, microService_GetStats

◆ microError

typedef struct micro_error_s microError

This error type is returned by most microservice functions. You can create your own custom errors by using micro_Errorf and wrap existing errors using microError_Wrapf. Errors are heap-allocated and must be freed with either microError_Destroy or by passing it into microRequest_Respond.

There are no public fields in this struct, use microError_Code, microError_Status, and microError_String to get more information about the error.

◆ microGroup

typedef struct micro_group_s microGroup

It has no other purpose than convenience, for organizing endpoint subject space.

◆ microRequest

typedef struct micro_request_s microRequest
See also
micro_request_s for descriptions of the fields.

◆ microService

typedef struct micro_service_s microService

It can be created with micro_AddService, and configured by passing a microServiceConfig to it. Once no longer needed, a microservice should be destroyed with microService_Destroy.

See also
micro_AddService, microServiceConfig, microEndpointConfig, microService_Destroy, microService_Stop, microService_IsStopped, microService_Run

◆ microServiceConfig

The service is created with a clone of the config and all of its values, so the original can be freed or modified after calling micro_AddService. See micro_service_config_s for descriptions of the fields.

See also
micro_service_config_s

◆ microServiceInfo

microServiceInfo is the struct returned by microService_GetInfo function. It is also accessible by sending a $SRV.INFO.<service-name>[.<id>] request to the service. See micro_service_info_s for descriptions of the fields.

See also
micro_service_info_s, microService_GetInfo

◆ microServiceStats

See also
micro_service_stats_s for descriptions of the fields, microService_GetStats