runtime

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Services []*Service

Functions

This section is empty.

Types

type ClientCaller

type ClientCaller struct {
	Server        string
	Client        *http.Client
	Authorization string
	TraceOptions  []trace.StartOption
}

func NewClientCaller

func NewClientCaller(server string) *ClientCaller

func (*ClientCaller) Call

func (caller *ClientCaller) Call(ctx context.Context, serviceName, methodName string, in, out proto.Message) error

type ClientOption

type ClientOption func(clientCaller *ClientCaller)

type Codec

type Codec interface {
	ContentType() string
	Decode(r io.Reader, data proto.Message) error
	Encode(w io.Writer, data proto.Message) error
}

func CodecFromType

func CodecFromType(codecType string) Codec

type CodecJSON

type CodecJSON struct {
}

func (*CodecJSON) ContentType

func (codec *CodecJSON) ContentType() string

func (*CodecJSON) Decode

func (codec *CodecJSON) Decode(r io.Reader, data proto.Message) error

func (*CodecJSON) Encode

func (codec *CodecJSON) Encode(w io.Writer, data proto.Message) error

type CodecPB

type CodecPB struct {
}

func (*CodecPB) ContentType

func (codec *CodecPB) ContentType() string

func (*CodecPB) Decode

func (codec *CodecPB) Decode(r io.Reader, data proto.Message) error

func (*CodecPB) Encode

func (codec *CodecPB) Encode(w io.Writer, data proto.Message) error

type KingError

type KingError struct {
	Err     string `json:"error"`
	Message string `json:"message"`
}

func (*KingError) Error

func (err *KingError) Error() string

type Method

type Method struct {
	Name    string
	Input   func() proto.Message
	Handler func(ctx context.Context, in proto.Message) (proto.Message, error)
}

type Service

type Service struct {
	Name    string
	Methods []*Method
}

Jump to

Keyboard shortcuts

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