/* Code generated by cmd/cgo; DO NOT EDIT. */

/* package github.com/alibaba/ilogtail/plugin_main */


#line 1 "cgo-builtin-export-prolog"

#include <stddef.h>

#ifndef GO_CGO_EXPORT_PROLOGUE_H
#define GO_CGO_EXPORT_PROLOGUE_H

#ifndef GO_CGO_GOSTRING_TYPEDEF
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
#endif

#endif

/* Start of preamble from import "C" comments.  */


#line 36 "plugin_export.go"

#include <stdlib.h>
static char**makeCharArray(int size) {
        return malloc(sizeof(char*) * size);
}

static void setArrayString(char **a, char *s, int n) {
        a[n] = s;
}

struct containerMeta{
	char* podName;
	char* k8sNamespace;
	char* containerName;
	char* image;
	int k8sLabelsSize;
	int containerLabelsSize;
	int envSize;
	char** k8sLabelsKey;
	char** k8sLabelsVal;
	char** containerLabelsKey;
	char** containerLabelsVal;
	char** envsKey;
	char** envsVal;
};

typedef struct {
    char* key;
    char* value;
} KeyValue;

typedef struct {
    KeyValue** keyValues;
    int count;
} PluginMetric;

typedef struct {
    PluginMetric** metrics;
    int count;
} PluginMetrics;

static KeyValue** makeKeyValueArray(int size) {
    return malloc(sizeof(KeyValue*) * size);
}

static void setArrayKeyValue(KeyValue **a, KeyValue *s, int n) {
    a[n] = s;
}

static PluginMetric** makePluginMetricArray(int size) {
    return malloc(sizeof(PluginMetric*) * size);
}

static void setArrayPluginMetric(PluginMetric **a, PluginMetric *s, int n) {
    a[n] = s;
}

#line 1 "cgo-generated-wrapper"


/* End of preamble from import "C" comments.  */


/* Start of boilerplate cgo prologue.  */
#line 1 "cgo-gcc-export-header-prolog"

#ifndef GO_CGO_PROLOGUE_H
#define GO_CGO_PROLOGUE_H

typedef signed char GoInt8;
typedef unsigned char GoUint8;
typedef short GoInt16;
typedef unsigned short GoUint16;
typedef int GoInt32;
typedef unsigned int GoUint32;
typedef long long GoInt64;
typedef unsigned long long GoUint64;
typedef GoInt64 GoInt;
typedef GoUint64 GoUint;
typedef size_t GoUintptr;
typedef float GoFloat32;
typedef double GoFloat64;
#ifdef _MSC_VER
#include <complex.h>
typedef _Fcomplex GoComplex64;
typedef _Dcomplex GoComplex128;
#else
typedef float _Complex GoComplex64;
typedef double _Complex GoComplex128;
#endif

/*
  static assertion to make sure the file is being used on architecture
  at least with matching size of GoInt.
*/
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];

#ifndef GO_CGO_GOSTRING_TYPEDEF
typedef _GoString_ GoString;
#endif
typedef void *GoMap;
typedef void *GoChan;
typedef struct { void *t; void *v; } GoInterface;
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;

#endif

/* End of boilerplate cgo prologue.  */

#ifdef __cplusplus
extern "C" {
#endif

extern __declspec(dllexport) GoInt InitPluginBase();
extern __declspec(dllexport) GoInt InitPluginBaseV2(GoString cfgStr);
extern __declspec(dllexport) GoInt LoadGlobalConfig(GoString jsonStr);
extern __declspec(dllexport) GoInt LoadPipeline(GoString project, GoString logstore, GoString configName, GoInt64 logstoreKey, GoString jsonStr);
extern __declspec(dllexport) GoInt UnloadPipeline(GoString configName);
extern __declspec(dllexport) GoInt ProcessLog(GoString configName, GoSlice logBytes, GoString packID, GoString topic, GoSlice tags);
extern __declspec(dllexport) GoInt ProcessLogGroup(GoString configName, GoSlice logBytes, GoString packID);
extern __declspec(dllexport) void StopAllPipelines(GoInt withInputFlag);
extern __declspec(dllexport) void Stop(GoString configName, GoInt removedFlag);
extern __declspec(dllexport) void StopBuiltInModules();
extern __declspec(dllexport) void Start(GoString configName);
extern __declspec(dllexport) void CtlCmd(GoString configName, GoInt cmdID, GoString cmdDetail);
extern __declspec(dllexport) char* GetAllContainers();
extern __declspec(dllexport) char* GetDiffContainers();
extern __declspec(dllexport) struct containerMeta* GetContainerMeta(GoString containerID);
extern __declspec(dllexport) PluginMetrics* GetGoMetrics(GoString metricType);

#ifdef __cplusplus
}
#endif
