greenplumn s3common_headers 源码

  • 2022-08-18
  • 浏览 (456)

greenplumn s3common_headers 代码

文件路径:/gpcontrib/gpcloud/include/s3common_headers.h

#ifndef __S3_COMMON_HEADERS_H__
#define __S3_COMMON_HEADERS_H__

#include <curl/curl.h>
#include <fcntl.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <openssl/hmac.h>
#include <openssl/md5.h>
#include <openssl/sha.h>
#include <pthread.h>
#include <zlib.h>
#include <algorithm>
#include <csignal>
#include <cstring>
#include <map>
#include <memory>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>

using std::map;
using std::string;
using std::stringstream;
using std::vector;

#define __STDC_FORMAT_MACROS
#include <inttypes.h>

#include "http_parser.h"
#include "ini.h"

#define DATE_STR_LEN 9
#define TIME_STAMP_STR_LEN 17

class S3Params;

extern string s3extErrorMessage;

class UniqueLock {
   public:
    UniqueLock(pthread_mutex_t *m) : mutex(m) {
        pthread_mutex_lock(this->mutex);
    }
    ~UniqueLock() {
        pthread_mutex_unlock(this->mutex);
    }

   private:
    pthread_mutex_t *mutex;
};

struct S3Credential {
    bool operator==(const S3Credential &other) const {
        return this->accessID == other.accessID && this->secret == other.secret &&
               this->token == other.token;
    }

    string accessID;
    string secret;
    string token;
};

S3Params InitConfig(const string &urlWithOptions);

void MaskThreadSignals();
#endif

相关信息

greenplumn 源码目录

相关文章

greenplumn compress_writer 源码

greenplumn decompress_reader 源码

greenplumn gpcheckcloud 源码

greenplumn gpcommon 源码

greenplumn gpreader 源码

greenplumn gpwriter 源码

greenplumn reader 源码

greenplumn restful_service 源码

greenplumn s3bucket_reader 源码

greenplumn s3common_reader 源码

0  赞