Documentation
¶
Overview ¶
Package api is a generated protocol buffer package.
It is generated from these files:
api.proto
It has these top-level messages:
FunctionInfo AddRequest AddResponse RemoveRequest RemoveResponse ListRequest ListResponse RunRequest RunResponse
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterMufaasServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMufaasServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MufaasServiceClient) error
- func RegisterMufaasServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMufaasServiceServer(s *grpc.Server, srv MufaasServiceServer)
- type AddRequest
- func (*AddRequest) Descriptor() ([]byte, []int)
- func (m *AddRequest) GetDockerfile() string
- func (m *AddRequest) GetImage() string
- func (m *AddRequest) GetInfo() *FunctionInfo
- func (m *AddRequest) GetSource() []byte
- func (m *AddRequest) GetTypesPath() []string
- func (*AddRequest) ProtoMessage()
- func (m *AddRequest) Reset()
- func (m *AddRequest) String() string
- type AddResponse
- type FunctionInfo
- func (*FunctionInfo) Descriptor() ([]byte, []int)
- func (m *FunctionInfo) GetCmd() []string
- func (m *FunctionInfo) GetEnv() []string
- func (m *FunctionInfo) GetError() string
- func (m *FunctionInfo) GetID() string
- func (m *FunctionInfo) GetName() string
- func (m *FunctionInfo) GetPrivileged() bool
- func (m *FunctionInfo) GetType() string
- func (*FunctionInfo) ProtoMessage()
- func (m *FunctionInfo) Reset()
- func (m *FunctionInfo) String() string
- type ListRequest
- type ListResponse
- type MufaasServiceClient
- type MufaasServiceServer
- type RemoveRequest
- type RemoveResponse
- type RunRequest
- func (*RunRequest) Descriptor() ([]byte, []int)
- func (m *RunRequest) GetArgs() []string
- func (m *RunRequest) GetEnv() []string
- func (m *RunRequest) GetName() string
- func (m *RunRequest) GetStdin() []byte
- func (*RunRequest) ProtoMessage()
- func (m *RunRequest) Reset()
- func (m *RunRequest) String() string
- type RunResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMufaasServiceHandler ¶
func RegisterMufaasServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMufaasServiceHandler registers the http handlers for service MufaasService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMufaasServiceHandlerClient ¶
func RegisterMufaasServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MufaasServiceClient) error
RegisterMufaasServiceHandler registers the http handlers for service MufaasService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MufaasServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MufaasServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MufaasServiceClient" to call the correct interceptors.
func RegisterMufaasServiceHandlerFromEndpoint ¶
func RegisterMufaasServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMufaasServiceHandlerFromEndpoint is same as RegisterMufaasServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMufaasServiceServer ¶
func RegisterMufaasServiceServer(s *grpc.Server, srv MufaasServiceServer)
Types ¶
type AddRequest ¶
type AddRequest struct { Info *FunctionInfo `protobuf:"bytes,1,opt,name=Info" json:"Info,omitempty"` Source []byte `protobuf:"bytes,2,opt,name=Source,proto3" json:"Source,omitempty"` Image string `protobuf:"bytes,3,opt,name=Image" json:"Image,omitempty"` Dockerfile string `protobuf:"bytes,4,opt,name=Dockerfile" json:"Dockerfile,omitempty"` TypesPath []string `protobuf:"bytes,5,rep,name=TypesPath" json:"TypesPath,omitempty"` }
func (*AddRequest) Descriptor ¶
func (*AddRequest) Descriptor() ([]byte, []int)
func (*AddRequest) GetDockerfile ¶
func (m *AddRequest) GetDockerfile() string
func (*AddRequest) GetImage ¶
func (m *AddRequest) GetImage() string
func (*AddRequest) GetInfo ¶
func (m *AddRequest) GetInfo() *FunctionInfo
func (*AddRequest) GetSource ¶
func (m *AddRequest) GetSource() []byte
func (*AddRequest) GetTypesPath ¶
func (m *AddRequest) GetTypesPath() []string
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) Reset ¶
func (m *AddRequest) Reset()
func (*AddRequest) String ¶
func (m *AddRequest) String() string
type AddResponse ¶
type AddResponse struct {
Info *FunctionInfo `protobuf:"bytes,1,opt,name=Info" json:"Info,omitempty"`
}
func (*AddResponse) Descriptor ¶
func (*AddResponse) Descriptor() ([]byte, []int)
func (*AddResponse) GetInfo ¶
func (m *AddResponse) GetInfo() *FunctionInfo
func (*AddResponse) ProtoMessage ¶
func (*AddResponse) ProtoMessage()
func (*AddResponse) Reset ¶
func (m *AddResponse) Reset()
func (*AddResponse) String ¶
func (m *AddResponse) String() string
type FunctionInfo ¶
type FunctionInfo struct { ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"` Type string `protobuf:"bytes,3,opt,name=Type" json:"Type,omitempty"` Cmd []string `protobuf:"bytes,4,rep,name=Cmd" json:"Cmd,omitempty"` Error string `protobuf:"bytes,5,opt,name=Error" json:"Error,omitempty"` Env []string `protobuf:"bytes,6,rep,name=Env" json:"Env,omitempty"` Privileged bool `protobuf:"varint,7,opt,name=Privileged" json:"Privileged,omitempty"` }
func (*FunctionInfo) Descriptor ¶
func (*FunctionInfo) Descriptor() ([]byte, []int)
func (*FunctionInfo) GetCmd ¶
func (m *FunctionInfo) GetCmd() []string
func (*FunctionInfo) GetEnv ¶
func (m *FunctionInfo) GetEnv() []string
func (*FunctionInfo) GetError ¶
func (m *FunctionInfo) GetError() string
func (*FunctionInfo) GetID ¶
func (m *FunctionInfo) GetID() string
func (*FunctionInfo) GetName ¶
func (m *FunctionInfo) GetName() string
func (*FunctionInfo) GetPrivileged ¶
func (m *FunctionInfo) GetPrivileged() bool
func (*FunctionInfo) GetType ¶
func (m *FunctionInfo) GetType() string
func (*FunctionInfo) ProtoMessage ¶
func (*FunctionInfo) ProtoMessage()
func (*FunctionInfo) Reset ¶
func (m *FunctionInfo) Reset()
func (*FunctionInfo) String ¶
func (m *FunctionInfo) String() string
type ListRequest ¶
type ListRequest struct {
Filter []string `protobuf:"bytes,1,rep,name=Filter" json:"Filter,omitempty"`
}
func (*ListRequest) Descriptor ¶
func (*ListRequest) Descriptor() ([]byte, []int)
func (*ListRequest) GetFilter ¶
func (m *ListRequest) GetFilter() []string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) Reset ¶
func (m *ListRequest) Reset()
func (*ListRequest) String ¶
func (m *ListRequest) String() string
type ListResponse ¶
type ListResponse struct {
Functions []*FunctionInfo `protobuf:"bytes,1,rep,name=Functions" json:"Functions,omitempty"`
}
func (*ListResponse) Descriptor ¶
func (*ListResponse) Descriptor() ([]byte, []int)
func (*ListResponse) GetFunctions ¶
func (m *ListResponse) GetFunctions() []*FunctionInfo
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) Reset ¶
func (m *ListResponse) Reset()
func (*ListResponse) String ¶
func (m *ListResponse) String() string
type MufaasServiceClient ¶
type MufaasServiceClient interface { Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error) }
func NewClient ¶
func NewClient(grpcEndpoint string) (MufaasServiceClient, *grpc.ClientConn, error)
NewClient return a new gRPC client with default settings
func NewMufaasServiceClient ¶
func NewMufaasServiceClient(cc *grpc.ClientConn) MufaasServiceClient
type MufaasServiceServer ¶
type MufaasServiceServer interface { Add(context.Context, *AddRequest) (*AddResponse, error) Remove(context.Context, *RemoveRequest) (*RemoveResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) Run(context.Context, *RunRequest) (*RunResponse, error) }
type RemoveRequest ¶
type RemoveRequest struct { Name []string `protobuf:"bytes,1,rep,name=Name" json:"Name,omitempty"` Force bool `protobuf:"varint,2,opt,name=Force" json:"Force,omitempty"` }
func (*RemoveRequest) Descriptor ¶
func (*RemoveRequest) Descriptor() ([]byte, []int)
func (*RemoveRequest) GetForce ¶
func (m *RemoveRequest) GetForce() bool
func (*RemoveRequest) GetName ¶
func (m *RemoveRequest) GetName() []string
func (*RemoveRequest) ProtoMessage ¶
func (*RemoveRequest) ProtoMessage()
func (*RemoveRequest) Reset ¶
func (m *RemoveRequest) Reset()
func (*RemoveRequest) String ¶
func (m *RemoveRequest) String() string
type RemoveResponse ¶
type RemoveResponse struct {
Functions []*FunctionInfo `protobuf:"bytes,1,rep,name=Functions" json:"Functions,omitempty"`
}
func (*RemoveResponse) Descriptor ¶
func (*RemoveResponse) Descriptor() ([]byte, []int)
func (*RemoveResponse) GetFunctions ¶
func (m *RemoveResponse) GetFunctions() []*FunctionInfo
func (*RemoveResponse) ProtoMessage ¶
func (*RemoveResponse) ProtoMessage()
func (*RemoveResponse) Reset ¶
func (m *RemoveResponse) Reset()
func (*RemoveResponse) String ¶
func (m *RemoveResponse) String() string
type RunRequest ¶
type RunRequest struct { Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"` Args []string `protobuf:"bytes,2,rep,name=Args" json:"Args,omitempty"` Env []string `protobuf:"bytes,3,rep,name=Env" json:"Env,omitempty"` Stdin []byte `protobuf:"bytes,4,opt,name=Stdin,proto3" json:"Stdin,omitempty"` }
func (*RunRequest) Descriptor ¶
func (*RunRequest) Descriptor() ([]byte, []int)
func (*RunRequest) GetArgs ¶
func (m *RunRequest) GetArgs() []string
func (*RunRequest) GetEnv ¶
func (m *RunRequest) GetEnv() []string
func (*RunRequest) GetName ¶
func (m *RunRequest) GetName() string
func (*RunRequest) GetStdin ¶
func (m *RunRequest) GetStdin() []byte
func (*RunRequest) ProtoMessage ¶
func (*RunRequest) ProtoMessage()
func (*RunRequest) Reset ¶
func (m *RunRequest) Reset()
func (*RunRequest) String ¶
func (m *RunRequest) String() string
type RunResponse ¶
type RunResponse struct { Output []byte `protobuf:"bytes,1,opt,name=Output,proto3" json:"Output,omitempty"` Err []byte `protobuf:"bytes,2,opt,name=Err,proto3" json:"Err,omitempty"` }
func (*RunResponse) Descriptor ¶
func (*RunResponse) Descriptor() ([]byte, []int)
func (*RunResponse) GetErr ¶
func (m *RunResponse) GetErr() []byte
func (*RunResponse) GetOutput ¶
func (m *RunResponse) GetOutput() []byte
func (*RunResponse) ProtoMessage ¶
func (*RunResponse) ProtoMessage()
func (*RunResponse) Reset ¶
func (m *RunResponse) Reset()
func (*RunResponse) String ¶
func (m *RunResponse) String() string