Skip to content

Commit

Permalink
make init public
Browse files Browse the repository at this point in the history
  • Loading branch information
dankinsoid committed May 1, 2024
1 parent 3f4a8c3 commit 520c439
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Sources/InfluxDBSwift/Point.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ extension InfluxDBClient {
/// .addDefaultTag(key: "customer", value: "California Miner")
/// .addDefaultTag(key: "data_center", value: "${env.DATA_CENTER_LOCATION}")
/// ````
public class PointSettings {
public struct PointSettings: Sendable {
// Default tags which will be added to each point written by api.
var tags: [String: String?] = [:]

public init() {}

/// Add new default tag with key and value.
///
/// - Parameters:
Expand All @@ -107,7 +109,9 @@ extension InfluxDBClient {
/// - Returns: Self
public func addDefaultTag(key: String?, value: String?) -> PointSettings {
if let key = key {
tags[key] = value
var result = self
result.tags[key] = value
return result
}
return self
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/InfluxDBSwift/WriteAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import Gzip
/// print("Successfully written data:\n\n\(recordTuple)")
///
/// ````
public struct WriteAPI {
public struct WriteAPI: Sendable {
/// Shared client.
private let client: InfluxDBClient
/// Settings for DataPoint.
Expand Down

0 comments on commit 520c439

Please sign in to comment.