function

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package function is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/api/rpc/function/function.proto

It has these top-level messages:

FunctionEntry
FunctionCall
FunctionReturn
CreateRequest
CreateReply
ListRequest
ListReply
DeleteRequest
DeleteReply

Package function is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFunctionHandler

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

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

func RegisterFunctionHandlerFromEndpoint

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

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

func RegisterFunctionServer

func RegisterFunctionServer(s *grpc.Server, srv FunctionServer)

Types

type CreateReply

type CreateReply struct {
	Function *FunctionEntry `protobuf:"bytes,1,opt,name=function" json:"function,omitempty"`
}

func (*CreateReply) Descriptor

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

func (*CreateReply) GetFunction

func (m *CreateReply) GetFunction() *FunctionEntry

func (*CreateReply) ProtoMessage

func (*CreateReply) ProtoMessage()

func (*CreateReply) Reset

func (m *CreateReply) Reset()

func (*CreateReply) String

func (m *CreateReply) String() string

type CreateRequest

type CreateRequest struct {
	Function *FunctionEntry `protobuf:"bytes,1,opt,name=function" json:"function,omitempty"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetFunction

func (m *CreateRequest) GetFunction() *FunctionEntry

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) String

func (m *CreateRequest) String() string

type DeleteReply

type DeleteReply struct {
}

func (*DeleteReply) Descriptor

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

func (*DeleteReply) ProtoMessage

func (*DeleteReply) ProtoMessage()

func (*DeleteReply) Reset

func (m *DeleteReply) Reset()

func (*DeleteReply) String

func (m *DeleteReply) String() string

type DeleteRequest

type DeleteRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*DeleteRequest) Descriptor

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

func (*DeleteRequest) GetId

func (m *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

type FunctionCall

type FunctionCall struct {
	CallID   string         `protobuf:"bytes,1,opt,name=callID" json:"callID,omitempty"`
	Input    []byte         `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
	Function *FunctionEntry `protobuf:"bytes,3,opt,name=function" json:"function,omitempty"`
	ReturnTo string         `protobuf:"bytes,4,opt,name=returnTo" json:"returnTo,omitempty"`
}

func (*FunctionCall) Descriptor

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

func (*FunctionCall) GetCallID

func (m *FunctionCall) GetCallID() string

func (*FunctionCall) GetFunction

func (m *FunctionCall) GetFunction() *FunctionEntry

func (*FunctionCall) GetInput

func (m *FunctionCall) GetInput() []byte

func (*FunctionCall) GetReturnTo

func (m *FunctionCall) GetReturnTo() string

func (*FunctionCall) ProtoMessage

func (*FunctionCall) ProtoMessage()

func (*FunctionCall) Reset

func (m *FunctionCall) Reset()

func (*FunctionCall) String

func (m *FunctionCall) String() string

type FunctionClient

type FunctionClient interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateReply, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteReply, error)
}

func NewFunctionClient

func NewFunctionClient(cc *grpc.ClientConn) FunctionClient

type FunctionEntry

type FunctionEntry struct {
	Id    string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Image string `protobuf:"bytes,3,opt,name=image" json:"image,omitempty"`
}

func (*FunctionEntry) Descriptor

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

func (*FunctionEntry) GetId

func (m *FunctionEntry) GetId() string

func (*FunctionEntry) GetImage

func (m *FunctionEntry) GetImage() string

func (*FunctionEntry) GetName

func (m *FunctionEntry) GetName() string

func (*FunctionEntry) ProtoMessage

func (*FunctionEntry) ProtoMessage()

func (*FunctionEntry) Reset

func (m *FunctionEntry) Reset()

func (*FunctionEntry) String

func (m *FunctionEntry) String() string

type FunctionReturn

type FunctionReturn struct {
	CallID string `protobuf:"bytes,1,opt,name=callID" json:"callID,omitempty"`
	Output []byte `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
}

func (*FunctionReturn) Descriptor

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

func (*FunctionReturn) GetCallID

func (m *FunctionReturn) GetCallID() string

func (*FunctionReturn) GetOutput

func (m *FunctionReturn) GetOutput() []byte

func (*FunctionReturn) ProtoMessage

func (*FunctionReturn) ProtoMessage()

func (*FunctionReturn) Reset

func (m *FunctionReturn) Reset()

func (*FunctionReturn) String

func (m *FunctionReturn) String() string

type FunctionServer

type FunctionServer interface {
	Create(context.Context, *CreateRequest) (*CreateReply, error)
	List(context.Context, *ListRequest) (*ListReply, error)
	Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
}

type ListReply

type ListReply struct {
	Functions []*FunctionEntry `protobuf:"bytes,1,rep,name=functions" json:"functions,omitempty"`
}

func (*ListReply) Descriptor

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

func (*ListReply) GetFunctions

func (m *ListReply) GetFunctions() []*FunctionEntry

func (*ListReply) ProtoMessage

func (*ListReply) ProtoMessage()

func (*ListReply) Reset

func (m *ListReply) Reset()

func (*ListReply) String

func (m *ListReply) String() string

type ListRequest

type ListRequest struct {
}

func (*ListRequest) Descriptor

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

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

type Server

type Server struct {
	Store         storage.Interface
	NatsStreaming ns.NatsStreaming
}

Server is used to implement function.FunctionServer

func (*Server) Create

func (s *Server) Create(ctx context.Context, in *CreateRequest) (*CreateReply, error)

Create implements function.Server

func (*Server) Delete

func (s *Server) Delete(ctx context.Context, in *DeleteRequest) (*DeleteReply, error)

Delete implements function.Server

func (*Server) List

func (s *Server) List(ctx context.Context, in *ListRequest) (*ListReply, error)

List implements function.Server

Jump to

Keyboard shortcuts

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