Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 610 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 610 Bytes

A GO Client for SMAP

This code was written to be a GO based client for SMAP. The code is not fully implemted, and at the time of writing, and only supports subscribtions.

Usage

Here is an example of a subscribtion:

output := make(chan smap.SubscribtionMessage, 1000)
quit := make(chan bool, 1)

client := smap.NewClient("http://www.someurl.com:8079")
client.Subscribe(output, quit, "Metadata/SourceName='SomeKey'")

go func() {
    time.Sleep(time.Second * 50)
    quit <- true
}()

for item := range output {
    fmt.Println(item.Path)
}