namespace

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package namespace is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Namespace.ProtoReflect.Descriptor instead.

func (*Namespace) GetDestination

func (x *Namespace) GetDestination() string

func (*Namespace) GetFirstSeen

func (x *Namespace) GetFirstSeen() int64

func (*Namespace) GetLastSeen

func (x *Namespace) GetLastSeen() int64

func (*Namespace) GetNamespace

func (x *Namespace) GetNamespace() string

func (*Namespace) GetType

func (x *Namespace) GetType() string

func (*Namespace) ProtoMessage

func (*Namespace) ProtoMessage()

func (*Namespace) ProtoReflect

func (x *Namespace) ProtoReflect() protoreflect.Message

func (*Namespace) Reset

func (x *Namespace) Reset()

func (*Namespace) String

func (x *Namespace) String() string

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.

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

Jump to

Keyboard shortcuts

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