grpc

package
v0.0.0-...-6a25cbf Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterReaderServer

func RegisterReaderServer(s *grpc.Server, srv ReaderServer)

Types

type PostMessageRequest

type PostMessageRequest struct {
	UserId               string   `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty", bson:"user_id,omitempty"`
	SourceId             string   `protobuf:"bytes,2,opt,name=source_id,json=sourceId" json:"source_id,omitempty", bson:"source_id,omitempty"`
	RequestId            string   `protobuf:"bytes,3,opt,name=request_id,json=requestId" json:"request_id,omitempty", bson:"request_id,omitempty"`
	Payload              []byte   `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty", bson:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PostMessageRequest) Descriptor

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

func (*PostMessageRequest) GetPayload

func (m *PostMessageRequest) GetPayload() []byte

func (*PostMessageRequest) GetRequestId

func (m *PostMessageRequest) GetRequestId() string

func (*PostMessageRequest) GetSourceId

func (m *PostMessageRequest) GetSourceId() string

func (*PostMessageRequest) GetUserId

func (m *PostMessageRequest) GetUserId() string

func (*PostMessageRequest) ProtoMessage

func (*PostMessageRequest) ProtoMessage()

func (*PostMessageRequest) Reset

func (m *PostMessageRequest) Reset()

func (*PostMessageRequest) String

func (m *PostMessageRequest) String() string

func (*PostMessageRequest) XXX_DiscardUnknown

func (m *PostMessageRequest) XXX_DiscardUnknown()

func (*PostMessageRequest) XXX_Marshal

func (m *PostMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostMessageRequest) XXX_Merge

func (dst *PostMessageRequest) XXX_Merge(src proto.Message)

func (*PostMessageRequest) XXX_Size

func (m *PostMessageRequest) XXX_Size() int

func (*PostMessageRequest) XXX_Unmarshal

func (m *PostMessageRequest) XXX_Unmarshal(b []byte) error

type PostMessageResponse

type PostMessageResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PostMessageResponse) Descriptor

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

func (*PostMessageResponse) ProtoMessage

func (*PostMessageResponse) ProtoMessage()

func (*PostMessageResponse) Reset

func (m *PostMessageResponse) Reset()

func (*PostMessageResponse) String

func (m *PostMessageResponse) String() string

func (*PostMessageResponse) XXX_DiscardUnknown

func (m *PostMessageResponse) XXX_DiscardUnknown()

func (*PostMessageResponse) XXX_Marshal

func (m *PostMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PostMessageResponse) XXX_Merge

func (dst *PostMessageResponse) XXX_Merge(src proto.Message)

func (*PostMessageResponse) XXX_Size

func (m *PostMessageResponse) XXX_Size() int

func (*PostMessageResponse) XXX_Unmarshal

func (m *PostMessageResponse) XXX_Unmarshal(b []byte) error

type ReaderClient

type ReaderClient interface {
	PostMessage(ctx context.Context, in *PostMessageRequest, opts ...grpc.CallOption) (*PostMessageResponse, error)
}

ReaderClient is the client API for Reader service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewReaderClient

func NewReaderClient(cc *grpc.ClientConn) ReaderClient

type ReaderFactory

type ReaderFactory struct{}

func (ReaderFactory) Create

func (r ReaderFactory) Create(configs map[string]interface{}) (models.Reader, error)

type ReaderServer

type ReaderServer interface {
	PostMessage(context.Context, *PostMessageRequest) (*PostMessageResponse, error)
}

ReaderServer is the server API for Reader service.

Jump to

Keyboard shortcuts

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