2020-03-18 17:24:33 +08:00
|
|
|
/*
|
|
|
|
|
* v1_endpoints.h
|
|
|
|
|
*
|
2025-06-08 08:13:38 +00:00
|
|
|
* Endpoints is a collection of endpoints that implement the actual service. Example: Name: \"mysvc\", Subsets: [ { Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}], Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}] }, { Addresses: [{\"ip\": \"10.10.3.3\"}], Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}] }, ] Endpoints is a legacy API and does not contain information about all Service features. Use discoveryv1.EndpointSlice for complete information about Service endpoints. Deprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice.
|
2020-03-18 17:24:33 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _v1_endpoints_H_
|
|
|
|
|
#define _v1_endpoints_H_
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "../external/cJSON.h"
|
|
|
|
|
#include "../include/list.h"
|
|
|
|
|
#include "../include/keyValuePair.h"
|
2020-06-20 09:41:15 +08:00
|
|
|
#include "../include/binary.h"
|
|
|
|
|
|
|
|
|
|
typedef struct v1_endpoints_t v1_endpoints_t;
|
|
|
|
|
|
2020-03-18 17:24:33 +08:00
|
|
|
#include "v1_endpoint_subset.h"
|
|
|
|
|
#include "v1_object_meta.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct v1_endpoints_t {
|
|
|
|
|
char *api_version; // string
|
|
|
|
|
char *kind; // string
|
|
|
|
|
struct v1_object_meta_t *metadata; //model
|
|
|
|
|
list_t *subsets; //nonprimitive container
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
int _library_owned; // Is the library responsible for freeing this object?
|
2020-03-18 17:24:33 +08:00
|
|
|
} v1_endpoints_t;
|
|
|
|
|
|
2025-02-11 19:36:46 +00:00
|
|
|
__attribute__((deprecated)) v1_endpoints_t *v1_endpoints_create(
|
2020-03-18 17:24:33 +08:00
|
|
|
char *api_version,
|
|
|
|
|
char *kind,
|
|
|
|
|
v1_object_meta_t *metadata,
|
|
|
|
|
list_t *subsets
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
void v1_endpoints_free(v1_endpoints_t *v1_endpoints);
|
|
|
|
|
|
|
|
|
|
v1_endpoints_t *v1_endpoints_parseFromJSON(cJSON *v1_endpointsJSON);
|
|
|
|
|
|
|
|
|
|
cJSON *v1_endpoints_convertToJSON(v1_endpoints_t *v1_endpoints);
|
|
|
|
|
|
|
|
|
|
#endif /* _v1_endpoints_H_ */
|
|
|
|
|
|