modulepackage
0.0.0-20171012131935-6d75251c912f
Repository: https://github.com/openfresh/plasma-go.git
Documentation: pkg.go.dev
# README
plasma-go
openfresh/plasma client library for Golang
Installation
Install:
go get -u github.com/openfresh/plasma-go
Import:
import "github.com/openfresh/plasma-go"
Usage
package main
import (
"encoding/json"
"log"
"github.com/openfresh/plasma-go"
"github.com/openfresh/plasma-go/config"
"github.com/openfresh/plasma-go/event"
)
func main() {
config := config.Config{
Type: plasma_client.TypeRedis,
}
client, err := plasma_client.New(config)
if err != nil {
log.Fatal(err)
}
payload := event.Payload{
Meta: event.MetaData{
Type: "video:1234:views",
},
Data: json.RawMessage(`{"data":55301}`),
}
err = client.Publish(payload)
if err != nil {
log.Fatal(err)
}
}
Documents
License
See LICENSE.
Copyright © CyberAgent, Inc. All Rights Reserved.
# Functions
New returns a publisher by Config.
# Constants
No description provided by the author
# Interfaces
No description provided by the author