Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.markdown

KSQL go client

GoDoc CircleCI

A barebones go client for interacting with Confluent's KSQL

Examples

List all Streams

	c := ksql.NewClient("http://localhost:8088")
	log.Println("=>>> Streams")
	streams, err := c.ListStreams()
	if err != nil {
		log.Fatal(err)
	}
	for i, v := range streams {
		log.Printf("Stream %d: %s", i, v.Name)
	}

List all Tables

	c := ksql.NewClient("http://localhost:8088")
	log.Println("=>>> Tables")
	tables, err := c.ListTables()
	if err != nil {
		log.Fatal(err)
	}
	for i, v := range tables {
		log.Printf("Table %d: %s", i, v.Name)
	}

Query stream

	c := ksql.NewClient("http://localhost:8088")
	log.Println("=>>> Forever Query :")
	ch := make(chan *ksql.QueryResponse)
	go c.Query(ksql.Request{KSQL: "SELECT pageid FROM pageviews_original;"}, ch)
	for {
		select {
		case msg := <-ch:
			log.Println(msg.Row)
		}
	}

About

A barebones go client for interacting with Confluent's KSQL Server

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.