NATS C Client with JetStream and Streaming support  3.9.1
The nats.io C Client, Supported by Synadia Communications Inc.

Typedefs

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

Variables

NATS_EXTERN microErrormicro_ErrorOutOfMemory
 
NATS_EXTERN microErrormicro_ErrorInvalidArg
 

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.

◆ microGroupConfig

◆ 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

Variable Documentation

◆ micro_ErrorOutOfMemory

NATS_EXTERN microError* micro_ErrorOutOfMemory
extern

◆ micro_ErrorInvalidArg

NATS_EXTERN microError* micro_ErrorInvalidArg
extern