Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

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

plasma-go

Circle CI Language issues License: MIT GoDoc

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

GoDoc

License

See LICENSE.

Copyright © CyberAgent, Inc. All Rights Reserved.

About

plasma client library for Golang

Resources

Releases

No releases published

Packages

No packages published