api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncodeJson = Encode("json")
	EncodeGob  = Encode("gob")
)

Variables

View Source
var File_hello_proto protoreflect.FileDescriptor

Functions

func GenRunHelloService

func GenRunHelloService(srv *rpc.Server, x HelloServiceInterface, network, address string, encode Encode) (func() error, error)

run service func

func RegisterHelloService

func RegisterHelloService(srv *rpc.Server, x HelloServiceInterface) error

register rpc service

Types

type Encode

type Encode string

encode format

type HelloServiceClient

type HelloServiceClient struct {
	*rpc.Client
}

client struct

func DialHelloService

func DialHelloService(network, address string, encode Encode) (*HelloServiceClient, error)

func (*HelloServiceClient) Hello

func (p *HelloServiceClient) Hello(in *String, out *String) error

type HelloServiceInterface

type HelloServiceInterface interface {
	Hello(*String, *String) error
}

interface defined

type String

type String struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*String) Descriptor deprecated

func (*String) Descriptor() ([]byte, []int)

Deprecated: Use String.ProtoReflect.Descriptor instead.

func (*String) GetValue

func (x *String) GetValue() string

func (*String) ProtoMessage

func (*String) ProtoMessage()

func (*String) ProtoReflect

func (x *String) ProtoReflect() protoreflect.Message

func (*String) Reset

func (x *String) Reset()

func (*String) String

func (x *String) String() string

Jump to

Keyboard shortcuts

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