fubsub

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

README

fubsub

Silly GCP pubsub-as-file example. Used as a demonstration of Go 1.11 modules in a Go West meetup in Sweden.

https://meetup.com/sweden-go-west

Usage

Run make test to run the tests, it will start the GCP pubsub emulator in the background using Docker Compose. Run make stop-emulator to stop the emaulator.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fubsub

type Fubsub struct {
	// contains filtered or unexported fields
}

Fubsub is a io.ReadWriteCloser for GCP pubsub.

func New

func New(projectID, name string) (*Fubsub, error)

New creates a new Fubsub.

func (*Fubsub) Close

func (f *Fubsub) Close() error

Close implements the Close method of the io.Closer interface.

func (*Fubsub) Read

func (f *Fubsub) Read(p []byte) (n int, err error)

Read implements the Read method of the io.Reader interface.

func (*Fubsub) Write

func (f *Fubsub) Write(p []byte) (n int, err error)

Write implements the Write method of the io.Writer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL