Skip to content

Go client library for publishing an event through Mercure protocol

Notifications You must be signed in to change notification settings

jdecool/go-mercure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-mercure

go-mercure is a Go client library for Mercure.

Usage

import "github.com/jdecool/go-mercure/mercure"

Publish an event

u, _ := url.Parse("https://localhost:3000/.well-known/mercure")
jwt := "my-jwt"

m := mercure.Message{
    Topics: []string{
        "http://localhost/test",
    },
    Data:  []byte("Hello World"),
}

p := mercure.NewPublisher(u, jwt, nil)
evtId, err := p.Publish(m)

About

Go client library for publishing an event through Mercure protocol

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages