12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // QNPipeline.h
- // QiniuSDK
- //
- // Created by BaiLong on 2017/7/25.
- // Copyright © 2017年 Qiniu. All rights reserved.
- //
- #ifndef QNPipeline_h
- #define QNPipeline_h
- @class QNHttpResponseInfo;
- @interface QNPipelineConfig : NSObject
- /**
- * 上报打点域名
- */
- @property (copy, nonatomic, readonly) NSString *host;
- /**
- * 超时时间 单位 秒
- */
- @property (assign) UInt32 timeoutInterval;
- - (instancetype)initWithHost:(NSString *)host;
- - (instancetype)init;
- @end
- /**
- * 上传完成后的回调函数
- *
- * @param info 上下文信息,包括状态码,错误值
- */
- typedef void (^QNPipelineCompletionHandler)(QNHttpResponseInfo *info);
- @interface QNPipeline : NSObject
- - (instancetype)init:(QNPipelineConfig *)config;
- - (void)pumpRepo:(NSString *)repo
- event:(NSDictionary *)data
- token:(NSString *)token
- handler:(QNPipelineCompletionHandler)handler;
- - (void)pumpRepo:(NSString *)repo
- events:(NSArray<NSDictionary *> *)data
- token:(NSString *)token
- handler:(QNPipelineCompletionHandler)handler;
- @end
- #endif /* QNPipeline_h */
|