Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions client_etl.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ type ETLConfiguration struct {
RoleArn string `json:"roleArn,omitempty"`
Script string `json:"script"`
ToTime int32 `json:"toTime,omitempty"`
Lang int8 `json:"version"`
Version int8 `json:"lang"`
Version int8 `json:"version"`
Lang string `json:"lang"`
ETLSinks []ETLSink `json:"sinks"`
}

Expand All @@ -38,15 +38,15 @@ type ETLSchedule struct {
}

type ETLSink struct {
AccessKeyId string `json:"accessKeyId"`
AccessKeySecret string `json:"accessKeySecret"`
Endpoint string `json:"endpoint"`
Logstore string `json:"logstore"`
Name string `json:"name"`
Project string `json:"project"`
RoleArn string `json:"roleArn,omitempty"`
Type string `json:"type,omitempty"`
DataSets string `json:"datasets"`
AccessKeyId string `json:"accessKeyId"`
AccessKeySecret string `json:"accessKeySecret"`
Endpoint string `json:"endpoint"`
Logstore string `json:"logstore"`
Name string `json:"name"`
Project string `json:"project"`
RoleArn string `json:"roleArn,omitempty"`
Type string `json:"type,omitempty"`
DataSets []string `json:"datasets,omitempty"`
}

type ListETLResponse struct {
Expand Down
6 changes: 5 additions & 1 deletion example/etl/etl_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
etlScript = "your etl script"
)

func main() {

Check failure on line 22 in example/etl/etl_example.go

View workflow job for this annotation

GitHub Actions / build

other declaration of main
// create the client with ak and endpoint
client := sls.CreateNormalInterface(endpoint, accessKeyId, accessKeySecret, securityToken)

Expand Down Expand Up @@ -76,7 +76,10 @@
AccessKeySecret: accessKeySecret,
Endpoint: endpoint,
Project: projectName,
Logstore: "target_logstore_name",
DataSets: []string{
"__UNNAMED__",
},
Logstore: "target_logstore_name",
}

config := sls.ETLConfiguration{
Expand All @@ -86,6 +89,7 @@
Logstore: logStoreName,
FromTime: time.Now().Unix(),
Script: etlScript,
Lang: "SPL",
Parameters: map[string]string{},
ETLSinks: []sls.ETLSink{sink},
}
Expand Down
Loading