server

package
v0.0.0-...-917b3cb Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Sdk          string                   `yaml:"sdk"`
	Host         string                   `yaml:"host"`
	Port         int                      `yaml:"port"`
	UserName     string                   `yaml:"userName"`
	Organization string                   `yaml:"organization"`
	Tls          Tls                      `yaml:"tls"`
	Batch        []map[string]interface{} `yaml:"batch"`
}

func (*Config) BatchClient

func (c *Config) BatchClient() (*batch.Client, error)

type Server

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

func New

func New(configPath string) (*Server, error)

func (*Server) Execute

func (s *Server) Execute(ctx context.Context, req *protos.TxRequest) (*protos.TxResponse, error)

func (*Server) Query

func (s *Server) Query(ctx context.Context, req *protos.TxRequest) (*protos.TxResponse, error)

func (*Server) Serve

func (s *Server) Serve() chan error

func (*Server) Stop

func (s *Server) Stop()

type Tls

type Tls struct {
	Certpath string `yaml:"certPath"`
	KeyPath  string `yaml:"keyPath"`
}

Jump to

Keyboard shortcuts

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