All Products
Search
Document Center

Simple Log Service:Overview

Last Updated:Jan 26, 2024

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

Versions

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

Sample code

Simple 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 Simple Log Service SDK for Go.

GitHub source code

Description

alert_example.go

Includes sample code that shows how to configure alerts. The sample code is used to provide the original alerting feature.

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.

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 Logtail configurations in JSON mode.

main.go

Includes sample code that shows how to query log data.

client_alert_test.go

Includes sample code that shows how to configure alerts. The sample code is used to provide the new alerting feature.

client_alert_resource_test.go

Includes sample code that shows how to create resources that can be used to configure alerts. The sample code is used to create resources that can provide the new alerting feature.