Documentation
¶
Overview ¶
Package namespace is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterNamespaceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespaceServiceClient) error
- func RegisterNamespaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterNamespaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespaceServiceServer) error
- func RegisterNamespaceServiceServer(s *grpc.Server, srv NamespaceServiceServer)
- type Namespace
- func (*Namespace) Descriptor() ([]byte, []int)deprecated
- func (x *Namespace) GetDestination() string
- func (x *Namespace) GetFirstSeen() int64
- func (x *Namespace) GetLastSeen() int64
- func (x *Namespace) GetNamespace() string
- func (x *Namespace) GetType() string
- func (*Namespace) ProtoMessage()
- func (x *Namespace) ProtoReflect() protoreflect.Message
- func (x *Namespace) Reset()
- func (x *Namespace) String() string
- type NamespaceRequest
- func (*NamespaceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NamespaceRequest) GetDestination() string
- func (x *NamespaceRequest) GetLastSeenEndTime() uint64
- func (x *NamespaceRequest) GetLastSeenStartTime() uint64
- func (x *NamespaceRequest) GetPage() uint64
- func (x *NamespaceRequest) GetSize() uint64
- func (*NamespaceRequest) ProtoMessage()
- func (x *NamespaceRequest) ProtoReflect() protoreflect.Message
- func (x *NamespaceRequest) Reset()
- func (x *NamespaceRequest) String() string
- type NamespaceResponse
- func (*NamespaceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *NamespaceResponse) GetNamespaces() []*Namespace
- func (*NamespaceResponse) ProtoMessage()
- func (x *NamespaceResponse) ProtoReflect() protoreflect.Message
- func (x *NamespaceResponse) Reset()
- func (x *NamespaceResponse) String() string
- type NamespaceServiceClient
- type NamespaceServiceServer
- type UnimplementedNamespaceServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_proto_namespace_proto protoreflect.FileDescriptor
Functions ¶
func RegisterNamespaceServiceHandler ¶
func RegisterNamespaceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterNamespaceServiceHandler registers the http handlers for service NamespaceService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterNamespaceServiceHandlerClient ¶
func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespaceServiceClient) error
RegisterNamespaceServiceHandlerClient registers the http handlers for service NamespaceService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NamespaceServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NamespaceServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NamespaceServiceClient" to call the correct interceptors.
func RegisterNamespaceServiceHandlerFromEndpoint ¶
func RegisterNamespaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterNamespaceServiceHandlerFromEndpoint is same as RegisterNamespaceServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterNamespaceServiceHandlerServer ¶
func RegisterNamespaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespaceServiceServer) error
RegisterNamespaceServiceHandlerServer registers the http handlers for service NamespaceService to "mux". UnaryRPC :call NamespaceServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNamespaceServiceHandlerFromEndpoint instead.
func RegisterNamespaceServiceServer ¶
func RegisterNamespaceServiceServer(s *grpc.Server, srv NamespaceServiceServer)
Types ¶
type Namespace ¶
type Namespace struct { Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` LastSeen int64 `protobuf:"varint,4,opt,name=lastSeen,proto3" json:"lastSeen,omitempty"` FirstSeen int64 `protobuf:"varint,5,opt,name=firstSeen,proto3" json:"firstSeen,omitempty"` // contains filtered or unexported fields }
func (*Namespace) Descriptor
deprecated
func (*Namespace) GetDestination ¶
func (*Namespace) GetFirstSeen ¶
func (*Namespace) GetLastSeen ¶
func (*Namespace) GetNamespace ¶
func (*Namespace) ProtoMessage ¶
func (*Namespace) ProtoMessage()
func (*Namespace) ProtoReflect ¶
func (x *Namespace) ProtoReflect() protoreflect.Message
type NamespaceRequest ¶
type NamespaceRequest struct { Page uint64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Destination string `protobuf:"bytes,3,opt,name=destination,proto3" json:"destination,omitempty"` LastSeenStartTime uint64 `protobuf:"varint,4,opt,name=lastSeenStartTime,proto3" json:"lastSeenStartTime,omitempty"` LastSeenEndTime uint64 `protobuf:"varint,5,opt,name=lastSeenEndTime,proto3" json:"lastSeenEndTime,omitempty"` // contains filtered or unexported fields }
func (*NamespaceRequest) Descriptor
deprecated
func (*NamespaceRequest) Descriptor() ([]byte, []int)
Deprecated: Use NamespaceRequest.ProtoReflect.Descriptor instead.
func (*NamespaceRequest) GetDestination ¶
func (x *NamespaceRequest) GetDestination() string
func (*NamespaceRequest) GetLastSeenEndTime ¶
func (x *NamespaceRequest) GetLastSeenEndTime() uint64
func (*NamespaceRequest) GetLastSeenStartTime ¶
func (x *NamespaceRequest) GetLastSeenStartTime() uint64
func (*NamespaceRequest) GetPage ¶
func (x *NamespaceRequest) GetPage() uint64
func (*NamespaceRequest) GetSize ¶
func (x *NamespaceRequest) GetSize() uint64
func (*NamespaceRequest) ProtoMessage ¶
func (*NamespaceRequest) ProtoMessage()
func (*NamespaceRequest) ProtoReflect ¶
func (x *NamespaceRequest) ProtoReflect() protoreflect.Message
func (*NamespaceRequest) Reset ¶
func (x *NamespaceRequest) Reset()
func (*NamespaceRequest) String ¶
func (x *NamespaceRequest) String() string
type NamespaceResponse ¶
type NamespaceResponse struct { Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` // contains filtered or unexported fields }
func (*NamespaceResponse) Descriptor
deprecated
func (*NamespaceResponse) Descriptor() ([]byte, []int)
Deprecated: Use NamespaceResponse.ProtoReflect.Descriptor instead.
func (*NamespaceResponse) GetNamespaces ¶
func (x *NamespaceResponse) GetNamespaces() []*Namespace
func (*NamespaceResponse) ProtoMessage ¶
func (*NamespaceResponse) ProtoMessage()
func (*NamespaceResponse) ProtoReflect ¶
func (x *NamespaceResponse) ProtoReflect() protoreflect.Message
func (*NamespaceResponse) Reset ¶
func (x *NamespaceResponse) Reset()
func (*NamespaceResponse) String ¶
func (x *NamespaceResponse) String() string
type NamespaceServiceClient ¶
type NamespaceServiceClient interface {
GetNamespaces(ctx context.Context, in *NamespaceRequest, opts ...grpc.CallOption) (*NamespaceResponse, error)
}
NamespaceServiceClient is the client API for NamespaceService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNamespaceServiceClient ¶
func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient
type NamespaceServiceServer ¶
type NamespaceServiceServer interface {
GetNamespaces(context.Context, *NamespaceRequest) (*NamespaceResponse, error)
}
NamespaceServiceServer is the server API for NamespaceService service.
type UnimplementedNamespaceServiceServer ¶
type UnimplementedNamespaceServiceServer struct { }
UnimplementedNamespaceServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedNamespaceServiceServer) GetNamespaces ¶
func (*UnimplementedNamespaceServiceServer) GetNamespaces(context.Context, *NamespaceRequest) (*NamespaceResponse, error)