Skip to content

Golang library to interact with metio compliant systems

License

Notifications You must be signed in to change notification settings

bagaluten/metio-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metio

Congratualtions you found the Go Metio Library which can be used to interact with Metio Compliant Systems.

Add it to your project

go get github.com/bagaluten/metio-go

Features

  • OpenTelemetry Tracing
  • Metio Streams
  • Metio Client

How to use it

func main() {
	ctx := context.Background()
	client, err := client.NewClient(client.Config{Host: "localhost:4222", Prefix: nil})
        if err != nil {
          // do something
        }

	defer client.Close()

	stream := streams.NewStream("stream", client)
	events := []types.Event{
		{
			EventID:   "123",
			ContextID: nil,
			EventType: types.MustParseEventType("group/name/version"),
			Payload: types.Payload{
				"key": "value",
			},
			Timestamp: types.TimeNow(),
		},
		{
			EventID:   "124",
			ContextID: nil,
			EventType: types.MustParseEventType("group/name/version"),
			Payload: types.Payload{
				"key": "value",
			},
			Timestamp: types.TimeNow(),
		},
	}

	err = stream.Publish(ctx, events)
}

About

Golang library to interact with metio compliant systems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages