broadcast

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCliFlags

func NewCliFlags() []cli.Flag

NewCliFlags returns cli flags to configure a broadcast client.

Types

type Client

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

Client is the the real implementation of broadcast client interface

func NewClient

func NewClient(sugar *zap.SugaredLogger, host string) (*Client, error)

NewClient creates a new broadcast client instance.

func NewClientFromContext

func NewClientFromContext(sugar *zap.SugaredLogger, c *cli.Context) (*Client, error)

NewClientFromContext returns new core client from cli flags.

func (*Client) GetTxInfo

func (c *Client) GetTxInfo(tx string) (ip string, country string, err error)

GetTxInfo get ip, country info of a tx

type Interface

type Interface interface {
	GetTxInfo(tx string) (string, string, error)
}

Interface represents a client o interact with Geoinfo APIs.

Jump to

Keyboard shortcuts

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