Log Service SDK for Go encapsulates all API operations of Log Service. You can use Log Service SDK for Go to call all API operations of Log Service.

Versions

For more information, see Alibaba Cloud Log Service SDK for Go Releases.

Sample code

Log Service SDK for Go provides a variety of sample code that you can use or reference. The following table describes the sample code that is provided by Log Service SDK for Go.
GitHub source code Description
alert_example.go Includes sample code that shows how to create alerts.
index_sample.go Includes sample code that shows how to create indexes, write log data, and query log data.
log_logstore.go Includes sample code that shows how to create and modify a Logstore.
machine_group_sample.go Includes sample code that shows how to manage the mapping relationships between machine groups and Logtail configurations.
shipper_sample.go Includes sample code that shows how to create a log shipping task.
simple_demo.go Includes sample code that shows how to use a consumer group to read data.
log_config_json.go Includes sample code that shows how to create a Logtail configuration in JSON mode.
main.go Includes sample code that shows how to query log data.