pb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: AGPL-3.0 Imports: 23 Imported by: 1

Documentation

Overview

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Protocol_name = map[int32]string{
		0: "Unknown",
		1: "Grpc",
		2: "Http",
	}
	Protocol_value = map[string]int32{
		"Unknown": 0,
		"Grpc":    1,
		"Http":    2,
	}
)

Enum value maps for Protocol.

View Source
var (
	Type_name = map[int32]string{
		0: "UnknownType",
		1: "CA",
		2: "Auth",
		3: "Organization",
		4: "TokenStore",
		5: "Data",
		6: "FileStorage",
		7: "AppStore",
		8: "Accounts",
		9: "Files",
	}
	Type_value = map[string]int32{
		"UnknownType":  0,
		"CA":           1,
		"Auth":         2,
		"Organization": 3,
		"TokenStore":   4,
		"Data":         5,
		"FileStorage":  6,
		"AppStore":     7,
		"Accounts":     8,
		"Files":        9,
	}
)

Enum value maps for Type.

View Source
var (
	Security_name = map[int32]string{
		0: "None",
		1: "TLS",
		2: "ACME",
		3: "MutualTLS",
	}
	Security_value = map[string]int32{
		"None":      0,
		"TLS":       1,
		"ACME":      2,
		"MutualTLS": 3,
	}
)

Enum value maps for Security.

View Source
var (
	Status_name = map[int32]string{
		0: "UnknownStatus",
		1: "Running",
		2: "Stopped",
	}
	Status_value = map[string]int32{
		"UnknownStatus": 0,
		"Running":       1,
		"Stopped":       2,
	}
)

Enum value maps for Status.

View Source
var (
	EventType_name = map[int32]string{
		0: "UnknownEvent",
		1: "Register",
		2: "DeRegister",
		3: "DeRegisterNode",
		4: "Update",
	}
	EventType_value = map[string]int32{
		"UnknownEvent":   0,
		"Register":       1,
		"DeRegister":     2,
		"DeRegisterNode": 3,
		"Update":         4,
	}
)

Enum value maps for EventType.

View Source
var (
	ActionOnRegisterExistingService_name = map[int32]string{
		0: "Replace",
		1: "UpdateExisting",
		2: "AddNodes",
		4: "RemoveOld",
	}
	ActionOnRegisterExistingService_value = map[string]int32{
		"Replace":        0,
		"UpdateExisting": 1,
		"AddNodes":       2,
		"RemoveOld":      4,
	}
)

Enum value maps for ActionOnRegisterExistingService.

View Source
var File_service_proto protoreflect.FileDescriptor

Functions

func NewDialer

func NewDialer(addr string, opts ...grpc.DialOption) *dialer

func RegisterCSRHandler

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

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

func RegisterCSRHandlerClient

func RegisterCSRHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CSRClient) error

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

func RegisterCSRHandlerFromEndpoint

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

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

func RegisterCSRHandlerServer

func RegisterCSRHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CSRServer) error

RegisterCSRHandlerServer registers the http handlers for service CSR to "mux". UnaryRPC :call CSRServer 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 RegisterCSRHandlerFromEndpoint instead.

func RegisterCSRServer

func RegisterCSRServer(s grpc.ServiceRegistrar, srv CSRServer)

func RegisterRegistryHandler

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

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

func RegisterRegistryHandlerClient

func RegisterRegistryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegistryClient) error

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

func RegisterRegistryHandlerFromEndpoint

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

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

func RegisterRegistryHandlerServer

func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegistryServer) error

RegisterRegistryHandlerServer registers the http handlers for service Registry to "mux". UnaryRPC :call RegistryServer 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 RegisterRegistryHandlerFromEndpoint instead.

func RegisterRegistryServer

func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer)

Types

type ActionOnRegisterExistingService

type ActionOnRegisterExistingService int32
const (
	ActionOnRegisterExistingService_Replace        ActionOnRegisterExistingService = 0
	ActionOnRegisterExistingService_UpdateExisting ActionOnRegisterExistingService = 1
	ActionOnRegisterExistingService_AddNodes       ActionOnRegisterExistingService = 2
	ActionOnRegisterExistingService_RemoveOld      ActionOnRegisterExistingService = 4
)

func (ActionOnRegisterExistingService) Descriptor

func (ActionOnRegisterExistingService) Enum

func (ActionOnRegisterExistingService) EnumDescriptor deprecated

func (ActionOnRegisterExistingService) EnumDescriptor() ([]byte, []int)

Deprecated: Use ActionOnRegisterExistingService.Descriptor instead.

func (ActionOnRegisterExistingService) Number

func (ActionOnRegisterExistingService) String

func (ActionOnRegisterExistingService) Type

type CSRClient

type CSRClient interface {
	SignCertificate(ctx context.Context, in *SignCertificateRequest, opts ...grpc.CallOption) (*SignCertificateResponse, error)
}

CSRClient is the client API for CSR service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCSRClient

func NewCSRClient(cc grpc.ClientConnInterface) CSRClient

type CSRData

type CSRData struct {
	Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	Domains   []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"`
	PublicKey []byte   `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	Subject   string   `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
	// contains filtered or unexported fields
}

func (*CSRData) Descriptor deprecated

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

Deprecated: Use CSRData.ProtoReflect.Descriptor instead.

func (*CSRData) GetAddresses

func (x *CSRData) GetAddresses() []string

func (*CSRData) GetDomains

func (x *CSRData) GetDomains() []string

func (*CSRData) GetPublicKey

func (x *CSRData) GetPublicKey() []byte

func (*CSRData) GetSubject

func (x *CSRData) GetSubject() string

func (*CSRData) ProtoMessage

func (*CSRData) ProtoMessage()

func (*CSRData) ProtoReflect

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

func (*CSRData) Reset

func (x *CSRData) Reset()

func (*CSRData) String

func (x *CSRData) String() string

type CSRServer

type CSRServer interface {
	SignCertificate(context.Context, *SignCertificateRequest) (*SignCertificateResponse, error)
	// contains filtered or unexported methods
}

CSRServer is the server API for CSR service. All implementations must embed UnimplementedCSRServer for forward compatibility

type ConnectionInfo

type ConnectionInfo struct {
	Protocol    Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=Protocol" json:"protocol,omitempty"`
	Address     string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Certificate []byte   `protobuf:"bytes,3,opt,name=Certificate,proto3" json:"Certificate,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectionInfo) Descriptor deprecated

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

Deprecated: Use ConnectionInfo.ProtoReflect.Descriptor instead.

func (*ConnectionInfo) GetAddress

func (x *ConnectionInfo) GetAddress() string

func (*ConnectionInfo) GetCertificate

func (x *ConnectionInfo) GetCertificate() []byte

func (*ConnectionInfo) GetProtocol

func (x *ConnectionInfo) GetProtocol() Protocol

func (*ConnectionInfo) ProtoMessage

func (*ConnectionInfo) ProtoMessage()

func (*ConnectionInfo) ProtoReflect

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

func (*ConnectionInfo) Reset

func (x *ConnectionInfo) Reset()

func (*ConnectionInfo) String

func (x *ConnectionInfo) String() string

type ConnectionPool

type ConnectionPool interface {
	Dialer(name string) (Dialer, error)
	Connection(name string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
}

func NewConnectionPool

func NewConnectionPool(registry Registry, opts ...PoolOption) ConnectionPool

type DeregisterRequest

type DeregisterRequest struct {
	RegistryId string   `protobuf:"bytes,1,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"`
	Nodes      []string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

func (*DeregisterRequest) Descriptor deprecated

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

Deprecated: Use DeregisterRequest.ProtoReflect.Descriptor instead.

func (*DeregisterRequest) GetNodes

func (x *DeregisterRequest) GetNodes() []string

func (*DeregisterRequest) GetRegistryId

func (x *DeregisterRequest) GetRegistryId() string

func (*DeregisterRequest) ProtoMessage

func (*DeregisterRequest) ProtoMessage()

func (*DeregisterRequest) ProtoReflect

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

func (*DeregisterRequest) Reset

func (x *DeregisterRequest) Reset()

func (*DeregisterRequest) String

func (x *DeregisterRequest) String() string

type DeregisterResponse

type DeregisterResponse struct {
	// contains filtered or unexported fields
}

func (*DeregisterResponse) Descriptor deprecated

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

Deprecated: Use DeregisterResponse.ProtoReflect.Descriptor instead.

func (*DeregisterResponse) ProtoMessage

func (*DeregisterResponse) ProtoMessage()

func (*DeregisterResponse) ProtoReflect

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

func (*DeregisterResponse) Reset

func (x *DeregisterResponse) Reset()

func (*DeregisterResponse) String

func (x *DeregisterResponse) String() string

type Dialer

type Dialer interface {
	Dial(opts ...grpc.DialOption) (*grpc.ClientConn, error)
}

type Event

type Event struct {
	Type               EventType                       `protobuf:"varint,1,opt,name=type,proto3,enum=EventType" json:"type,omitempty"`
	ServiceId          string                          `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	Info               *Info                           `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
	OnRegisterExisting ActionOnRegisterExistingService `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetInfo

func (x *Event) GetInfo() *Info

func (*Event) GetOnRegisterExisting

func (x *Event) GetOnRegisterExisting() ActionOnRegisterExistingService

func (*Event) GetServiceId

func (x *Event) GetServiceId() string

func (*Event) GetType

func (x *Event) GetType() EventType

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventHandler

type EventHandler interface {
	Handle(*Event)
}

type EventHandlerFunc

type EventHandlerFunc func(*Event)

func (EventHandlerFunc) Handle

func (h EventHandlerFunc) Handle(event *Event)

type EventType

type EventType int32
const (
	EventType_UnknownEvent   EventType = 0
	EventType_Register       EventType = 1
	EventType_DeRegister     EventType = 2
	EventType_DeRegisterNode EventType = 3
	EventType_Update         EventType = 4
)

func (EventType) Descriptor

func (EventType) Descriptor() protoreflect.EnumDescriptor

func (EventType) Enum

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor deprecated

func (EventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EventType.Descriptor instead.

func (EventType) Number

func (x EventType) Number() protoreflect.EnumNumber

func (EventType) String

func (x EventType) String() string

func (EventType) Type

type GetRequest

type GetRequest struct {
	RegistryId string `protobuf:"bytes,1,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetRegistryId

func (x *GetRequest) GetRegistryId() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Info *Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetInfo

func (x *GetResponse) GetInfo() *Info

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type Info

type Info struct {
	Id    string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Type  Type              `protobuf:"varint,2,opt,name=type,proto3,enum=Type" json:"type,omitempty"`
	Label string            `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
	Nodes []*Node           `protobuf:"bytes,4,rep,name=nodes,proto3" json:"nodes,omitempty"`
	Meta  map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Info) Descriptor deprecated

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

Deprecated: Use Info.ProtoReflect.Descriptor instead.

func (*Info) GetId

func (x *Info) GetId() string

func (*Info) GetLabel

func (x *Info) GetLabel() string

func (*Info) GetMeta

func (x *Info) GetMeta() map[string]string

func (*Info) GetNodes

func (x *Info) GetNodes() []*Node

func (*Info) GetType

func (x *Info) GetType() Type

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) ProtoReflect

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

func (*Info) Reset

func (x *Info) Reset()

func (*Info) String

func (x *Info) String() string

type ListRequest

type ListRequest struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetNamespace

func (x *ListRequest) GetNamespace() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	Applications []*Info `protobuf:"bytes,1,rep,name=applications,proto3" json:"applications,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetApplications

func (x *ListResponse) GetApplications() []*Info

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type Node

type Node struct {
	Id       string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Protocol Protocol          `protobuf:"varint,2,opt,name=protocol,proto3,enum=Protocol" json:"protocol,omitempty"`
	Address  string            `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	Security Security          `protobuf:"varint,4,opt,name=security,proto3,enum=Security" json:"security,omitempty"`
	Ttl      int64             `protobuf:"varint,5,opt,name=ttl,proto3" json:"ttl,omitempty"`
	Meta     map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetAddress

func (x *Node) GetAddress() string

func (*Node) GetId

func (x *Node) GetId() string

func (*Node) GetMeta

func (x *Node) GetMeta() map[string]string

func (*Node) GetProtocol

func (x *Node) GetProtocol() Protocol

func (*Node) GetSecurity

func (x *Node) GetSecurity() Security

func (*Node) GetTtl

func (x *Node) GetTtl() int64

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type PoolOption

type PoolOption func(p *poolOptions)

func CACert

func CACert(filename string) PoolOption

func Cert

func Cert(filename string) PoolOption

func Key

func Key(filename string, password []byte) PoolOption

type Protocol

type Protocol int32
const (
	Protocol_Unknown Protocol = 0
	Protocol_Grpc    Protocol = 1
	Protocol_Http    Protocol = 2
)

func (Protocol) Descriptor

func (Protocol) Descriptor() protoreflect.EnumDescriptor

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor deprecated

func (Protocol) EnumDescriptor() ([]byte, []int)

Deprecated: Use Protocol.Descriptor instead.

func (Protocol) Number

func (x Protocol) Number() protoreflect.EnumNumber

func (Protocol) String

func (x Protocol) String() string

func (Protocol) Type

type RegisterRequest

type RegisterRequest struct {
	Service *Info                           `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	Action  ActionOnRegisterExistingService `protobuf:"varint,2,opt,name=action,proto3,enum=ActionOnRegisterExistingService" json:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetAction

func (*RegisterRequest) GetService

func (x *RegisterRequest) GetService() *Info

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type RegisterResponse

type RegisterResponse struct {
	RegistryId string `protobuf:"bytes,1,opt,name=registry_id,json=registryId,proto3" json:"registry_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterResponse) Descriptor deprecated

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

Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.

func (*RegisterResponse) GetRegistryId

func (x *RegisterResponse) GetRegistryId() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) ProtoReflect

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

func (*RegisterResponse) Reset

func (x *RegisterResponse) Reset()

func (*RegisterResponse) String

func (x *RegisterResponse) String() string

type Registry

type Registry interface {
	RegisterService(info *Info) error
	DeregisterService(id string, nodes ...string) error
	GetService(id string) (*Info, error)
	GetNode(id string, nodeId string) (*Node, error)
	Certificate(id string) ([]byte, error)
	ConnectionInfo(id string, protocol Protocol) (*ConnectionInfo, error)
	RegisterEventHandler(h EventHandler) string
	DeregisterEventHandler(string)
	GetOfType(t Type) ([]*Info, error)
	FirstOfType(t Type) (*Info, error)
	Stop() error
}

type RegistryClient

type RegistryClient interface {
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	Deregister(ctx context.Context, in *DeregisterRequest, opts ...grpc.CallOption) (*DeregisterResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
	Listen(ctx context.Context, opts ...grpc.CallOption) (Registry_ListenClient, error)
}

RegistryClient is the client API for Registry service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewRegistryClient

func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient

type RegistryServer

type RegistryServer interface {
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error)
	List(context.Context, *ListRequest) (*ListResponse, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Search(context.Context, *SearchRequest) (*SearchResponse, error)
	Listen(Registry_ListenServer) error
	// contains filtered or unexported methods
}

RegistryServer is the server API for Registry service. All implementations must embed UnimplementedRegistryServer for forward compatibility

type Registry_ListenClient

type Registry_ListenClient interface {
	Send(*Event) error
	Recv() (*Event, error)
	grpc.ClientStream
}

type Registry_ListenServer

type Registry_ListenServer interface {
	Send(*Event) error
	Recv() (*Event, error)
	grpc.ServerStream
}

type SearchRequest

type SearchRequest struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Type      Type   `protobuf:"varint,2,opt,name=type,proto3,enum=Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetNamespace

func (x *SearchRequest) GetNamespace() string

func (*SearchRequest) GetType

func (x *SearchRequest) GetType() Type

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

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

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

type SearchResponse

type SearchResponse struct {
	Services []*Info `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchResponse) Descriptor deprecated

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

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetServices

func (x *SearchResponse) GetServices() []*Info

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

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

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

type Security

type Security int32
const (
	Security_None      Security = 0
	Security_TLS       Security = 1
	Security_ACME      Security = 2
	Security_MutualTLS Security = 3
)

func (Security) Descriptor

func (Security) Descriptor() protoreflect.EnumDescriptor

func (Security) Enum

func (x Security) Enum() *Security

func (Security) EnumDescriptor deprecated

func (Security) EnumDescriptor() ([]byte, []int)

Deprecated: Use Security.Descriptor instead.

func (Security) Number

func (x Security) Number() protoreflect.EnumNumber

func (Security) String

func (x Security) String() string

func (Security) Type

type Selector

type Selector func(*Info) bool

type SignCertificateRequest

type SignCertificateRequest struct {
	Csr *CSRData `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"`
	// contains filtered or unexported fields
}

func (*SignCertificateRequest) Descriptor deprecated

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

Deprecated: Use SignCertificateRequest.ProtoReflect.Descriptor instead.

func (*SignCertificateRequest) GetCsr

func (x *SignCertificateRequest) GetCsr() *CSRData

func (*SignCertificateRequest) ProtoMessage

func (*SignCertificateRequest) ProtoMessage()

func (*SignCertificateRequest) ProtoReflect

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

func (*SignCertificateRequest) Reset

func (x *SignCertificateRequest) Reset()

func (*SignCertificateRequest) String

func (x *SignCertificateRequest) String() string

type SignCertificateResponse

type SignCertificateResponse struct {
	RawCertificate []byte `protobuf:"bytes,1,opt,name=raw_certificate,json=rawCertificate,proto3" json:"raw_certificate,omitempty"`
	// contains filtered or unexported fields
}

func (*SignCertificateResponse) Descriptor deprecated

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

Deprecated: Use SignCertificateResponse.ProtoReflect.Descriptor instead.

func (*SignCertificateResponse) GetRawCertificate

func (x *SignCertificateResponse) GetRawCertificate() []byte

func (*SignCertificateResponse) ProtoMessage

func (*SignCertificateResponse) ProtoMessage()

func (*SignCertificateResponse) ProtoReflect

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

func (*SignCertificateResponse) Reset

func (x *SignCertificateResponse) Reset()

func (*SignCertificateResponse) String

func (x *SignCertificateResponse) String() string

type State

type State struct {
	Status   Status            `protobuf:"varint,1,opt,name=status,proto3,enum=Status" json:"status,omitempty"`
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetMetadata

func (x *State) GetMetadata() map[string]string

func (*State) GetStatus

func (x *State) GetStatus() Status

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

type Status

type Status int32
const (
	Status_UnknownStatus Status = 0
	Status_Running       Status = 1
	Status_Stopped       Status = 2
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type Type

type Type int32
const (
	Type_UnknownType  Type = 0
	Type_CA           Type = 1
	Type_Auth         Type = 2
	Type_Organization Type = 3
	Type_TokenStore   Type = 4
	Type_Data         Type = 5
	Type_FileStorage  Type = 6
	Type_AppStore     Type = 7
	Type_Accounts     Type = 8
	Type_Files        Type = 9
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

type UnimplementedCSRServer

type UnimplementedCSRServer struct {
}

UnimplementedCSRServer must be embedded to have forward compatible implementations.

func (UnimplementedCSRServer) SignCertificate

type UnimplementedRegistryServer

type UnimplementedRegistryServer struct {
}

UnimplementedRegistryServer must be embedded to have forward compatible implementations.

func (UnimplementedRegistryServer) Deregister

func (UnimplementedRegistryServer) Get

func (UnimplementedRegistryServer) List

func (UnimplementedRegistryServer) Listen

func (UnimplementedRegistryServer) Register

func (UnimplementedRegistryServer) Search

type UnsafeCSRServer

type UnsafeCSRServer interface {
	// contains filtered or unexported methods
}

UnsafeCSRServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CSRServer will result in compilation errors.

type UnsafeRegistryServer

type UnsafeRegistryServer interface {
	// contains filtered or unexported methods
}

UnsafeRegistryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RegistryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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