package main
import (
"context"
"fmt"
icclent "cloud.inspur.com/event-center-sdk-go/client"
icevent "cloud.inspur.com/event-center-sdk-go/event"
)
func main() {
c, _ := icclent.Init("http://localhost:8081")
event := icevent.NewEvent()
event.SetSubject("subject1")
event.SetType("type")
event.SetSource("source1")
event.SetResource("rsource")
event.SetAccountid("accoun")
event.SetAction("list")
event.SetRegion("rego")
var data = map[string]string{"name":"asdf", "id":"47178080808"}
err := event.SetBody(data)
err = c.Send(context.Background(), event)
if err != nil {
fmt.Println(err)
}
}