management

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Overview

Package management is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	WatchEventType_name = map[int32]string{
		0: "Added",
		2: "Deleted",
	}
	WatchEventType_value = map[string]int32{
		"Added":   0,
		"Deleted": 2,
	}
)

Enum value maps for WatchEventType.

View Source
var File_pkg_management_management_proto protoreflect.FileDescriptor
View Source
var Management_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "management.Management",
	HandlerType: (*ManagementServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateBootstrapToken",
			Handler:    _Management_CreateBootstrapToken_Handler,
		},
		{
			MethodName: "RevokeBootstrapToken",
			Handler:    _Management_RevokeBootstrapToken_Handler,
		},
		{
			MethodName: "ListBootstrapTokens",
			Handler:    _Management_ListBootstrapTokens_Handler,
		},
		{
			MethodName: "GetBootstrapToken",
			Handler:    _Management_GetBootstrapToken_Handler,
		},
		{
			MethodName: "ListClusters",
			Handler:    _Management_ListClusters_Handler,
		},
		{
			MethodName: "DeleteCluster",
			Handler:    _Management_DeleteCluster_Handler,
		},
		{
			MethodName: "CertsInfo",
			Handler:    _Management_CertsInfo_Handler,
		},
		{
			MethodName: "GetCluster",
			Handler:    _Management_GetCluster_Handler,
		},
		{
			MethodName: "EditCluster",
			Handler:    _Management_EditCluster_Handler,
		},
		{
			MethodName: "CreateRole",
			Handler:    _Management_CreateRole_Handler,
		},
		{
			MethodName: "DeleteRole",
			Handler:    _Management_DeleteRole_Handler,
		},
		{
			MethodName: "GetRole",
			Handler:    _Management_GetRole_Handler,
		},
		{
			MethodName: "CreateRoleBinding",
			Handler:    _Management_CreateRoleBinding_Handler,
		},
		{
			MethodName: "DeleteRoleBinding",
			Handler:    _Management_DeleteRoleBinding_Handler,
		},
		{
			MethodName: "GetRoleBinding",
			Handler:    _Management_GetRoleBinding_Handler,
		},
		{
			MethodName: "ListRoles",
			Handler:    _Management_ListRoles_Handler,
		},
		{
			MethodName: "ListRoleBindings",
			Handler:    _Management_ListRoleBindings_Handler,
		},
		{
			MethodName: "SubjectAccess",
			Handler:    _Management_SubjectAccess_Handler,
		},
		{
			MethodName: "APIExtensions",
			Handler:    _Management_APIExtensions_Handler,
		},
		{
			MethodName: "GetConfig",
			Handler:    _Management_GetConfig_Handler,
		},
		{
			MethodName: "UpdateConfig",
			Handler:    _Management_UpdateConfig_Handler,
		},
		{
			MethodName: "ListCapabilities",
			Handler:    _Management_ListCapabilities_Handler,
		},
		{
			MethodName: "CapabilityInstaller",
			Handler:    _Management_CapabilityInstaller_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchClusters",
			Handler:       _Management_WatchClusters_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/management/management.proto",
}

Management_ServiceDesc is the grpc.ServiceDesc for Management service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func DefaultManagementSocket

func DefaultManagementSocket() string

func OpenAPISpec

func OpenAPISpec() []byte

func RegisterManagementHandler

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

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

func RegisterManagementHandlerClient

func RegisterManagementHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ManagementClient) error

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

func RegisterManagementHandlerFromEndpoint

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

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

func RegisterManagementHandlerServer

func RegisterManagementHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ManagementServer) error

RegisterManagementHandlerServer registers the http handlers for service Management to "mux". UnaryRPC :call ManagementServer 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 RegisterManagementHandlerFromEndpoint instead.

func RegisterManagementServer

func RegisterManagementServer(s grpc.ServiceRegistrar, srv ManagementServer)

Types

type APIExtensionInfo

type APIExtensionInfo struct {
	ServiceDesc *descriptorpb.ServiceDescriptorProto `protobuf:"bytes,1,opt,name=serviceDesc,proto3" json:"serviceDesc,omitempty"`
	Rules       []*HTTPRuleDescriptor                `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*APIExtensionInfo) Descriptor deprecated

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

Deprecated: Use APIExtensionInfo.ProtoReflect.Descriptor instead.

func (*APIExtensionInfo) GetRules

func (x *APIExtensionInfo) GetRules() []*HTTPRuleDescriptor

func (*APIExtensionInfo) GetServiceDesc

func (*APIExtensionInfo) ProtoMessage

func (*APIExtensionInfo) ProtoMessage()

func (*APIExtensionInfo) ProtoReflect

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

func (*APIExtensionInfo) Reset

func (x *APIExtensionInfo) Reset()

func (*APIExtensionInfo) String

func (x *APIExtensionInfo) String() string

type APIExtensionInfoList

type APIExtensionInfoList struct {
	Items []*APIExtensionInfo `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*APIExtensionInfoList) Descriptor deprecated

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

Deprecated: Use APIExtensionInfoList.ProtoReflect.Descriptor instead.

func (*APIExtensionInfoList) GetItems

func (x *APIExtensionInfoList) GetItems() []*APIExtensionInfo

func (*APIExtensionInfoList) ProtoMessage

func (*APIExtensionInfoList) ProtoMessage()

func (*APIExtensionInfoList) ProtoReflect

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

func (*APIExtensionInfoList) Reset

func (x *APIExtensionInfoList) Reset()

func (*APIExtensionInfoList) String

func (x *APIExtensionInfoList) String() string

type CapabilitiesDataSource

type CapabilitiesDataSource interface {
	CapabilitiesStore() capabilities.BackendStore
}

CapabilitiesDataSource provides a way to obtain data which the management server needs to serve capabilities-related endpoints

type CapabilityInstallerRequest

type CapabilityInstallerRequest struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Pin   string `protobuf:"bytes,3,opt,name=pin,proto3" json:"pin,omitempty"`
	// contains filtered or unexported fields
}

func (*CapabilityInstallerRequest) Descriptor deprecated

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

Deprecated: Use CapabilityInstallerRequest.ProtoReflect.Descriptor instead.

func (*CapabilityInstallerRequest) GetName

func (x *CapabilityInstallerRequest) GetName() string

func (*CapabilityInstallerRequest) GetPin

func (x *CapabilityInstallerRequest) GetPin() string

func (*CapabilityInstallerRequest) GetToken

func (x *CapabilityInstallerRequest) GetToken() string

func (*CapabilityInstallerRequest) ProtoMessage

func (*CapabilityInstallerRequest) ProtoMessage()

func (*CapabilityInstallerRequest) ProtoReflect

func (*CapabilityInstallerRequest) Reset

func (x *CapabilityInstallerRequest) Reset()

func (*CapabilityInstallerRequest) String

func (x *CapabilityInstallerRequest) String() string

type CapabilityInstallerResponse

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

func (*CapabilityInstallerResponse) Descriptor deprecated

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

Deprecated: Use CapabilityInstallerResponse.ProtoReflect.Descriptor instead.

func (*CapabilityInstallerResponse) GetCommand

func (x *CapabilityInstallerResponse) GetCommand() string

func (*CapabilityInstallerResponse) ProtoMessage

func (*CapabilityInstallerResponse) ProtoMessage()

func (*CapabilityInstallerResponse) ProtoReflect

func (*CapabilityInstallerResponse) Reset

func (x *CapabilityInstallerResponse) Reset()

func (*CapabilityInstallerResponse) String

func (x *CapabilityInstallerResponse) String() string

type CapabilityList

type CapabilityList struct {
	Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*CapabilityList) Descriptor deprecated

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

Deprecated: Use CapabilityList.ProtoReflect.Descriptor instead.

func (*CapabilityList) GetItems

func (x *CapabilityList) GetItems() []string

func (*CapabilityList) ProtoMessage

func (*CapabilityList) ProtoMessage()

func (*CapabilityList) ProtoReflect

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

func (*CapabilityList) Reset

func (x *CapabilityList) Reset()

func (*CapabilityList) String

func (x *CapabilityList) String() string

type CertsInfoResponse

type CertsInfoResponse struct {
	Chain []*core.CertInfo `protobuf:"bytes,1,rep,name=chain,proto3" json:"chain,omitempty"`
	// contains filtered or unexported fields
}

func (*CertsInfoResponse) Descriptor deprecated

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

Deprecated: Use CertsInfoResponse.ProtoReflect.Descriptor instead.

func (*CertsInfoResponse) GetChain

func (x *CertsInfoResponse) GetChain() []*core.CertInfo

func (*CertsInfoResponse) ProtoMessage

func (*CertsInfoResponse) ProtoMessage()

func (*CertsInfoResponse) ProtoReflect

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

func (*CertsInfoResponse) Reset

func (x *CertsInfoResponse) Reset()

func (*CertsInfoResponse) String

func (x *CertsInfoResponse) String() string

type ConfigDocument

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

func (*ConfigDocument) Descriptor deprecated

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

Deprecated: Use ConfigDocument.ProtoReflect.Descriptor instead.

func (*ConfigDocument) GetJson

func (x *ConfigDocument) GetJson() []byte

func (*ConfigDocument) ProtoMessage

func (*ConfigDocument) ProtoMessage()

func (*ConfigDocument) ProtoReflect

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

func (*ConfigDocument) Reset

func (x *ConfigDocument) Reset()

func (*ConfigDocument) String

func (x *ConfigDocument) String() string

type ConfigDocumentWithSchema

type ConfigDocumentWithSchema struct {
	Json   []byte `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"`
	Yaml   []byte `protobuf:"bytes,2,opt,name=yaml,proto3" json:"yaml,omitempty"`
	Schema []byte `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigDocumentWithSchema) Descriptor deprecated

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

Deprecated: Use ConfigDocumentWithSchema.ProtoReflect.Descriptor instead.

func (*ConfigDocumentWithSchema) GetJson

func (x *ConfigDocumentWithSchema) GetJson() []byte

func (*ConfigDocumentWithSchema) GetSchema

func (x *ConfigDocumentWithSchema) GetSchema() []byte

func (*ConfigDocumentWithSchema) GetYaml

func (x *ConfigDocumentWithSchema) GetYaml() []byte

func (*ConfigDocumentWithSchema) ProtoMessage

func (*ConfigDocumentWithSchema) ProtoMessage()

func (*ConfigDocumentWithSchema) ProtoReflect

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

func (*ConfigDocumentWithSchema) Reset

func (x *ConfigDocumentWithSchema) Reset()

func (*ConfigDocumentWithSchema) String

func (x *ConfigDocumentWithSchema) String() string

type CoreDataSource

type CoreDataSource interface {
	StorageBackend() storage.Backend
	TLSConfig() *tls.Config
}

CoreDataSource provides a way to obtain data which the management server needs to serve its core API

type CreateBootstrapTokenRequest

type CreateBootstrapTokenRequest struct {
	Ttl          *durationpb.Duration    `protobuf:"bytes,1,opt,name=ttl,proto3" json:"ttl,omitempty"`
	Labels       map[string]string       `` /* 153-byte string literal not displayed */
	Capabilities []*core.TokenCapability `protobuf:"bytes,3,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateBootstrapTokenRequest) Descriptor deprecated

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

Deprecated: Use CreateBootstrapTokenRequest.ProtoReflect.Descriptor instead.

func (*CreateBootstrapTokenRequest) GetCapabilities

func (x *CreateBootstrapTokenRequest) GetCapabilities() []*core.TokenCapability

func (*CreateBootstrapTokenRequest) GetLabels

func (x *CreateBootstrapTokenRequest) GetLabels() map[string]string

func (*CreateBootstrapTokenRequest) GetTtl

func (*CreateBootstrapTokenRequest) ProtoMessage

func (*CreateBootstrapTokenRequest) ProtoMessage()

func (*CreateBootstrapTokenRequest) ProtoReflect

func (*CreateBootstrapTokenRequest) Reset

func (x *CreateBootstrapTokenRequest) Reset()

func (*CreateBootstrapTokenRequest) String

func (x *CreateBootstrapTokenRequest) String() string

func (*CreateBootstrapTokenRequest) Validate

func (r *CreateBootstrapTokenRequest) Validate() error

type EditClusterRequest

type EditClusterRequest struct {
	Cluster *core.Reference   `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"`
	Labels  map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*EditClusterRequest) Descriptor deprecated

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

Deprecated: Use EditClusterRequest.ProtoReflect.Descriptor instead.

func (*EditClusterRequest) GetCluster

func (x *EditClusterRequest) GetCluster() *core.Reference

func (*EditClusterRequest) GetLabels

func (x *EditClusterRequest) GetLabels() map[string]string

func (*EditClusterRequest) ProtoMessage

func (*EditClusterRequest) ProtoMessage()

func (*EditClusterRequest) ProtoReflect

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

func (*EditClusterRequest) Reset

func (x *EditClusterRequest) Reset()

func (*EditClusterRequest) String

func (x *EditClusterRequest) String() string

func (*EditClusterRequest) Validate

func (r *EditClusterRequest) Validate() error

type GatewayConfig

type GatewayConfig struct {
	Documents []*ConfigDocumentWithSchema `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"`
	// contains filtered or unexported fields
}

func (*GatewayConfig) Descriptor deprecated

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

Deprecated: Use GatewayConfig.ProtoReflect.Descriptor instead.

func (*GatewayConfig) GetDocuments

func (x *GatewayConfig) GetDocuments() []*ConfigDocumentWithSchema

func (*GatewayConfig) ProtoMessage

func (*GatewayConfig) ProtoMessage()

func (*GatewayConfig) ProtoReflect

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

func (*GatewayConfig) Reset

func (x *GatewayConfig) Reset()

func (*GatewayConfig) String

func (x *GatewayConfig) String() string

type HTTPRuleDescriptor

type HTTPRuleDescriptor struct {
	Http   *annotations.HttpRule               `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"`
	Method *descriptorpb.MethodDescriptorProto `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	// contains filtered or unexported fields
}

func (*HTTPRuleDescriptor) Descriptor deprecated

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

Deprecated: Use HTTPRuleDescriptor.ProtoReflect.Descriptor instead.

func (*HTTPRuleDescriptor) GetHttp

func (x *HTTPRuleDescriptor) GetHttp() *annotations.HttpRule

func (*HTTPRuleDescriptor) GetMethod

func (*HTTPRuleDescriptor) ProtoMessage

func (*HTTPRuleDescriptor) ProtoMessage()

func (*HTTPRuleDescriptor) ProtoReflect

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

func (*HTTPRuleDescriptor) Reset

func (x *HTTPRuleDescriptor) Reset()

func (*HTTPRuleDescriptor) String

func (x *HTTPRuleDescriptor) String() string

type ListClustersRequest

type ListClustersRequest struct {
	MatchLabels  *core.LabelSelector `protobuf:"bytes,1,opt,name=matchLabels,proto3" json:"matchLabels,omitempty"`
	MatchOptions core.MatchOptions   `protobuf:"varint,2,opt,name=matchOptions,proto3,enum=core.MatchOptions" json:"matchOptions,omitempty"`
	// contains filtered or unexported fields
}

func (*ListClustersRequest) Descriptor deprecated

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

Deprecated: Use ListClustersRequest.ProtoReflect.Descriptor instead.

func (*ListClustersRequest) GetMatchLabels

func (x *ListClustersRequest) GetMatchLabels() *core.LabelSelector

func (*ListClustersRequest) GetMatchOptions

func (x *ListClustersRequest) GetMatchOptions() core.MatchOptions

func (*ListClustersRequest) ProtoMessage

func (*ListClustersRequest) ProtoMessage()

func (*ListClustersRequest) ProtoReflect

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

func (*ListClustersRequest) Reset

func (x *ListClustersRequest) Reset()

func (*ListClustersRequest) String

func (x *ListClustersRequest) String() string

func (*ListClustersRequest) Validate

func (r *ListClustersRequest) Validate() error

type ManagementClient

type ManagementClient interface {
	CreateBootstrapToken(ctx context.Context, in *CreateBootstrapTokenRequest, opts ...grpc.CallOption) (*core.BootstrapToken, error)
	RevokeBootstrapToken(ctx context.Context, in *core.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListBootstrapTokens(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*core.BootstrapTokenList, error)
	GetBootstrapToken(ctx context.Context, in *core.Reference, opts ...grpc.CallOption) (*core.BootstrapToken, error)
	ListClusters(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*core.ClusterList, error)
	WatchClusters(ctx context.Context, in *WatchClustersRequest, opts ...grpc.CallOption) (Management_WatchClustersClient, error)
	DeleteCluster(ctx context.Context, in *core.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CertsInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CertsInfoResponse, error)
	GetCluster(ctx context.Context, in *core.Reference, opts ...grpc.CallOption) (*core.Cluster, error)
	EditCluster(ctx context.Context, in *EditClusterRequest, opts ...grpc.CallOption) (*core.Cluster, error)
	CreateRole(ctx context.Context, in *core.Role, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteRole(ctx context.Context, in *core.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetRole(ctx context.Context, in *core.Reference, opts ...grpc.CallOption) (*core.Role, error)
	CreateRoleBinding(ctx context.Context, in *core.RoleBinding, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteRoleBinding(ctx context.Context, in *core.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetRoleBinding(ctx context.Context, in *core.Reference, opts ...grpc.CallOption) (*core.RoleBinding, error)
	ListRoles(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*core.RoleList, error)
	ListRoleBindings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*core.RoleBindingList, error)
	SubjectAccess(ctx context.Context, in *core.SubjectAccessRequest, opts ...grpc.CallOption) (*core.ReferenceList, error)
	APIExtensions(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*APIExtensionInfoList, error)
	GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GatewayConfig, error)
	UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListCapabilities(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CapabilityList, error)
	CapabilityInstaller(ctx context.Context, in *CapabilityInstallerRequest, opts ...grpc.CallOption) (*CapabilityInstallerResponse, error)
}

ManagementClient is the client API for Management 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 NewManagementClient

func NewManagementClient(cc grpc.ClientConnInterface) ManagementClient

type ManagementClientOption

type ManagementClientOption func(*ManagementClientOptions)

func WithDialOptions

func WithDialOptions(options ...grpc.DialOption) ManagementClientOption

func WithListenAddress

func WithListenAddress(addr string) ManagementClientOption

type ManagementClientOptions

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

func (*ManagementClientOptions) Apply

type ManagementServer

type ManagementServer interface {
	CreateBootstrapToken(context.Context, *CreateBootstrapTokenRequest) (*core.BootstrapToken, error)
	RevokeBootstrapToken(context.Context, *core.Reference) (*emptypb.Empty, error)
	ListBootstrapTokens(context.Context, *emptypb.Empty) (*core.BootstrapTokenList, error)
	GetBootstrapToken(context.Context, *core.Reference) (*core.BootstrapToken, error)
	ListClusters(context.Context, *ListClustersRequest) (*core.ClusterList, error)
	WatchClusters(*WatchClustersRequest, Management_WatchClustersServer) error
	DeleteCluster(context.Context, *core.Reference) (*emptypb.Empty, error)
	CertsInfo(context.Context, *emptypb.Empty) (*CertsInfoResponse, error)
	GetCluster(context.Context, *core.Reference) (*core.Cluster, error)
	EditCluster(context.Context, *EditClusterRequest) (*core.Cluster, error)
	CreateRole(context.Context, *core.Role) (*emptypb.Empty, error)
	DeleteRole(context.Context, *core.Reference) (*emptypb.Empty, error)
	GetRole(context.Context, *core.Reference) (*core.Role, error)
	CreateRoleBinding(context.Context, *core.RoleBinding) (*emptypb.Empty, error)
	DeleteRoleBinding(context.Context, *core.Reference) (*emptypb.Empty, error)
	GetRoleBinding(context.Context, *core.Reference) (*core.RoleBinding, error)
	ListRoles(context.Context, *emptypb.Empty) (*core.RoleList, error)
	ListRoleBindings(context.Context, *emptypb.Empty) (*core.RoleBindingList, error)
	SubjectAccess(context.Context, *core.SubjectAccessRequest) (*core.ReferenceList, error)
	APIExtensions(context.Context, *emptypb.Empty) (*APIExtensionInfoList, error)
	GetConfig(context.Context, *emptypb.Empty) (*GatewayConfig, error)
	UpdateConfig(context.Context, *UpdateConfigRequest) (*emptypb.Empty, error)
	ListCapabilities(context.Context, *emptypb.Empty) (*CapabilityList, error)
	CapabilityInstaller(context.Context, *CapabilityInstallerRequest) (*CapabilityInstallerResponse, error)
	// contains filtered or unexported methods
}

ManagementServer is the server API for Management service. All implementations must embed UnimplementedManagementServer for forward compatibility

type ManagementServerOption

type ManagementServerOption func(*ManagementServerOptions)

func WithAPIExtensions

func WithAPIExtensions(exts []APIExtensionPlugin) ManagementServerOption

func WithSystemPlugins

func WithSystemPlugins(plugins []plugins.ActivePlugin) ManagementServerOption

type ManagementServerOptions

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

func (*ManagementServerOptions) Apply

type Management_WatchClustersClient

type Management_WatchClustersClient interface {
	Recv() (*WatchEvent, error)
	grpc.ClientStream
}

type Management_WatchClustersServer

type Management_WatchClustersServer interface {
	Send(*WatchEvent) error
	grpc.ServerStream
}

type Server

type Server struct {
	UnsafeManagementServer
	ManagementServerOptions
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	ctx context.Context,
	conf *v1beta1.ManagementSpec,
	cds CoreDataSource,
	opts ...ManagementServerOption,
) *Server

func (*Server) APIExtensions

func (m *Server) APIExtensions(context.Context, *emptypb.Empty) (*APIExtensionInfoList, error)

func (*Server) CapabilityInstaller

func (m *Server) CapabilityInstaller(
	ctx context.Context,
	req *CapabilityInstallerRequest,
) (*CapabilityInstallerResponse, error)

func (*Server) CertsInfo

func (m *Server) CertsInfo(ctx context.Context, _ *emptypb.Empty) (*CertsInfoResponse, error)

func (*Server) Collect

func (s *Server) Collect(c chan<- prometheus.Metric)

func (*Server) CreateBootstrapToken

func (m *Server) CreateBootstrapToken(
	ctx context.Context,
	req *CreateBootstrapTokenRequest,
) (*core.BootstrapToken, error)

func (*Server) CreateRole

func (s *Server) CreateRole(ctx context.Context, in *core.Role) (*emptypb.Empty, error)

func (*Server) CreateRoleBinding

func (s *Server) CreateRoleBinding(ctx context.Context, in *core.RoleBinding) (*emptypb.Empty, error)

func (*Server) DeleteCluster

func (m *Server) DeleteCluster(
	ctx context.Context,
	ref *core.Reference,
) (*emptypb.Empty, error)

func (*Server) DeleteRole

func (s *Server) DeleteRole(ctx context.Context, in *core.Reference) (*emptypb.Empty, error)

func (*Server) DeleteRoleBinding

func (s *Server) DeleteRoleBinding(ctx context.Context, in *core.Reference) (*emptypb.Empty, error)

func (*Server) Describe

func (s *Server) Describe(c chan<- *prometheus.Desc)

func (*Server) EditCluster

func (m *Server) EditCluster(
	ctx context.Context,
	in *EditClusterRequest,
) (*core.Cluster, error)

func (*Server) GetBootstrapToken

func (m *Server) GetBootstrapToken(
	ctx context.Context,
	ref *core.Reference,
) (*core.BootstrapToken, error)

func (*Server) GetCluster

func (m *Server) GetCluster(
	ctx context.Context,
	ref *core.Reference,
) (*core.Cluster, error)

func (*Server) GetConfig

func (m *Server) GetConfig(
	ctx context.Context,
	_ *emptypb.Empty,
) (*GatewayConfig, error)

func (*Server) GetRole

func (s *Server) GetRole(ctx context.Context, in *core.Reference) (*core.Role, error)

func (*Server) GetRoleBinding

func (s *Server) GetRoleBinding(ctx context.Context, in *core.Reference) (*core.RoleBinding, error)

func (*Server) ListBootstrapTokens

func (m *Server) ListBootstrapTokens(
	ctx context.Context,
	_ *emptypb.Empty,
) (*core.BootstrapTokenList, error)

func (*Server) ListCapabilities

func (m *Server) ListCapabilities(ctx context.Context, _ *emptypb.Empty) (*CapabilityList, error)

func (*Server) ListClusters

func (m *Server) ListClusters(
	ctx context.Context,
	in *ListClustersRequest,
) (*core.ClusterList, error)

func (*Server) ListRoleBindings

func (s *Server) ListRoleBindings(ctx context.Context, _ *emptypb.Empty) (*core.RoleBindingList, error)

func (*Server) ListRoles

func (s *Server) ListRoles(ctx context.Context, _ *emptypb.Empty) (*core.RoleList, error)

func (*Server) ListenAndServe

func (m *Server) ListenAndServe() error

func (*Server) RevokeBootstrapToken

func (m *Server) RevokeBootstrapToken(
	ctx context.Context,
	ref *core.Reference,
) (*emptypb.Empty, error)

func (*Server) SubjectAccess

func (s *Server) SubjectAccess(ctx context.Context, sar *core.SubjectAccessRequest) (*core.ReferenceList, error)

func (*Server) UpdateConfig

func (m *Server) UpdateConfig(
	ctx context.Context,
	in *UpdateConfigRequest,
) (*emptypb.Empty, error)

func (*Server) WatchClusters

func (m *Server) WatchClusters(
	in *WatchClustersRequest,
	stream Management_WatchClustersServer,
) error

type StreamDirector

type StreamDirector func(ctx context.Context, fullMethodName string) (context.Context, *UnknownStreamMetadata, error)

type UnimplementedManagementServer

type UnimplementedManagementServer struct {
}

UnimplementedManagementServer must be embedded to have forward compatible implementations.

func (UnimplementedManagementServer) APIExtensions

func (UnimplementedManagementServer) CertsInfo

func (UnimplementedManagementServer) CreateBootstrapToken

func (UnimplementedManagementServer) CreateRole

func (UnimplementedManagementServer) CreateRoleBinding

func (UnimplementedManagementServer) DeleteCluster

func (UnimplementedManagementServer) DeleteRole

func (UnimplementedManagementServer) DeleteRoleBinding

func (UnimplementedManagementServer) EditCluster

func (UnimplementedManagementServer) GetBootstrapToken

func (UnimplementedManagementServer) GetCluster

func (UnimplementedManagementServer) GetConfig

func (UnimplementedManagementServer) GetRole

func (UnimplementedManagementServer) GetRoleBinding

func (UnimplementedManagementServer) ListBootstrapTokens

func (UnimplementedManagementServer) ListCapabilities

func (UnimplementedManagementServer) ListClusters

func (UnimplementedManagementServer) ListRoleBindings

func (UnimplementedManagementServer) ListRoles

func (UnimplementedManagementServer) RevokeBootstrapToken

func (UnimplementedManagementServer) SubjectAccess

func (UnimplementedManagementServer) UpdateConfig

func (UnimplementedManagementServer) WatchClusters

type UnknownStreamMetadata

type UnknownStreamMetadata struct {
	Conn       *grpc.ClientConn
	InputType  *desc.MessageDescriptor
	OutputType *desc.MessageDescriptor
}

type UnsafeManagementServer

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

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

type UpdateConfigRequest

type UpdateConfigRequest struct {
	Documents []*ConfigDocument `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateConfigRequest) Descriptor deprecated

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

Deprecated: Use UpdateConfigRequest.ProtoReflect.Descriptor instead.

func (*UpdateConfigRequest) GetDocuments

func (x *UpdateConfigRequest) GetDocuments() []*ConfigDocument

func (*UpdateConfigRequest) ProtoMessage

func (*UpdateConfigRequest) ProtoMessage()

func (*UpdateConfigRequest) ProtoReflect

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

func (*UpdateConfigRequest) Reset

func (x *UpdateConfigRequest) Reset()

func (*UpdateConfigRequest) String

func (x *UpdateConfigRequest) String() string

func (*UpdateConfigRequest) Validate

func (r *UpdateConfigRequest) Validate() error

type WatchClustersRequest

type WatchClustersRequest struct {
	KnownClusters *core.ReferenceList `protobuf:"bytes,1,opt,name=knownClusters,proto3" json:"knownClusters,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchClustersRequest) Descriptor deprecated

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

Deprecated: Use WatchClustersRequest.ProtoReflect.Descriptor instead.

func (*WatchClustersRequest) GetKnownClusters

func (x *WatchClustersRequest) GetKnownClusters() *core.ReferenceList

func (*WatchClustersRequest) ProtoMessage

func (*WatchClustersRequest) ProtoMessage()

func (*WatchClustersRequest) ProtoReflect

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

func (*WatchClustersRequest) Reset

func (x *WatchClustersRequest) Reset()

func (*WatchClustersRequest) String

func (x *WatchClustersRequest) String() string

func (*WatchClustersRequest) Validate

func (r *WatchClustersRequest) Validate() error

type WatchEvent

type WatchEvent struct {
	Cluster *core.Reference `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"`
	Type    WatchEventType  `protobuf:"varint,2,opt,name=type,proto3,enum=management.WatchEventType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchEvent) Descriptor deprecated

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

Deprecated: Use WatchEvent.ProtoReflect.Descriptor instead.

func (*WatchEvent) GetCluster

func (x *WatchEvent) GetCluster() *core.Reference

func (*WatchEvent) GetType

func (x *WatchEvent) GetType() WatchEventType

func (*WatchEvent) ProtoMessage

func (*WatchEvent) ProtoMessage()

func (*WatchEvent) ProtoReflect

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

func (*WatchEvent) Reset

func (x *WatchEvent) Reset()

func (*WatchEvent) String

func (x *WatchEvent) String() string

type WatchEventType

type WatchEventType int32
const (
	WatchEventType_Added   WatchEventType = 0
	WatchEventType_Deleted WatchEventType = 2
)

func (WatchEventType) Descriptor

func (WatchEventType) Enum

func (x WatchEventType) Enum() *WatchEventType

func (WatchEventType) EnumDescriptor deprecated

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

Deprecated: Use WatchEventType.Descriptor instead.

func (WatchEventType) Number

func (WatchEventType) String

func (x WatchEventType) String() string

func (WatchEventType) Type

Jump to

Keyboard shortcuts

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