alfa

package
v0.0.0-...-e1c0fc4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2018 License: MIT Imports: 15 Imported by: 2

Documentation

Overview

Package alfa is a generated protocol buffer package.

Alfa Service

Alfa Service API consists of a single service which returns a message.

It is generated from these files:

alfa.proto

It has these top-level messages:

Message

Package alfa is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAlfaServiceHandler

func RegisterAlfaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAlfaServiceHandler registers the http handlers for service AlfaService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAlfaServiceHandlerClient

func RegisterAlfaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlfaServiceClient) error

RegisterAlfaServiceHandler registers the http handlers for service AlfaService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AlfaServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AlfaServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AlfaServiceClient" to call the correct interceptors.

func RegisterAlfaServiceHandlerFromEndpoint

func RegisterAlfaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAlfaServiceHandlerFromEndpoint is same as RegisterAlfaServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAlfaServiceServer

func RegisterAlfaServiceServer(s *grpc.Server, srv AlfaServiceServer)

Types

type AlfaServiceClient

type AlfaServiceClient interface {
	// Get method receives a simple message and returns it.
	// The message posted as the id parameter will also be returned.
	Get(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Message, error)
	// Alfa method sets a simple message.
	Set(ctx context.Context, in *Message, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
	Test(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*beta.Message, error)
}

func NewAlfaServiceClient

func NewAlfaServiceClient(cc *grpc.ClientConn) AlfaServiceClient

type AlfaServiceServer

type AlfaServiceServer interface {
	// Get method receives a simple message and returns it.
	// The message posted as the id parameter will also be returned.
	Get(context.Context, *google_protobuf1.Empty) (*Message, error)
	// Alfa method sets a simple message.
	Set(context.Context, *Message) (*google_protobuf1.Empty, error)
	Test(context.Context, *google_protobuf1.Empty) (*beta.Message, error)
}

type Message

type Message struct {
	// Id represents the message identifier.
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// The message to be sent.
	Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
}

Message represents a simple message sent to the Alfa service.

func (*Message) Descriptor

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

func (*Message) GetId

func (m *Message) GetId() string

func (*Message) GetMsg

func (m *Message) GetMsg() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

Jump to

Keyboard shortcuts

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