grpc

package
v0.0.0-...-7077701 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

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

View Source
const Name = "grpc"

Variables

This section is empty.

Functions

func RegisterAdaptorServer

func RegisterAdaptorServer(s *grpc.Server, srv AdaptorServer)

Types

type AdaptorClient

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

AdaptorClient is the client API for Adaptor service.

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

func NewAdaptorClient

func NewAdaptorClient(cc *grpc.ClientConn) AdaptorClient

type AdaptorFactory

type AdaptorFactory struct{}

func (AdaptorFactory) Create

func (r AdaptorFactory) Create(servingOptions *adaptors.AdaptorOptions) (adaptors.Adaptor, error)

type AdaptorServer

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

AdaptorServer is the server API for Adaptor service.

type PostMessageRequest

type PostMessageRequest struct {
	UserId               string   `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" bson:"user_id,omitempty"`
	SourceId             string   `protobuf:"bytes,2,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty" bson:"source_id,omitempty"`
	RequestId            string   `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" 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

Jump to

Keyboard shortcuts

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