lakeclient

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

lake-client

Message relay client

godoc for jancajthaml-openbank/lake-client

Usage

Given lake relay is running on 10.0.0.12

On machine A

import (
  client "github.com/jancajthaml-openbank/lake-client/go"
)

from := client.NewClient("from", "10.0.0.12")
from.Publish <- "to hello"
from.Publish <- "to there"

On machine B

import (
  client "github.com/jancajthaml-openbank/lake-client/go"
)

to := client.NewClient("to", "10.0.0.12")
<-to.Receive // from hello
<-to.Receive // from there

Fetch

go get github.com/jancajthaml-openbank/lake-client/go

License

Licensed under Apache 2.0 see LICENSE.md for details

Author

Jan Cajthaml (a.k.a johnny)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Publish chan<- string
	Receive <-chan string
	// contains filtered or unexported fields
}

Client for lake message relay and retrieve

func NewClient

func NewClient(parentCtx context.Context, region, host string) (*Client, error)

NewClient returns instance of lake client

func (*Client) Done

func (client *Client) Done() <-chan struct{}

Done cancel channel

func (*Client) Start

func (client *Client) Start()

Start lake client

func (*Client) Stop

func (client *Client) Stop()

Stop lake client

Jump to

Keyboard shortcuts

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