Documentation
¶
Index ¶
- Variables
- type GRPCClient
- func (m *GRPCClient) GetContextPrefix(ctx context.Context, path string) (string, error)
- func (m *GRPCClient) GetID(ctx context.Context) (string, error)
- func (m *GRPCClient) GetKubeconfigForPath(ctx context.Context, path string, tags map[string]string) ([]byte, error)
- func (m *GRPCClient) StartSearch(ctx context.Context, channel chan storetypes.SearchResult)
- func (m *GRPCClient) VerifyKubeconfigPaths(ctx context.Context) error
- type GRPCServer
- func (m *GRPCServer) GetContextPrefix(ctx context.Context, req *kubeconfigstorev1.GetContextPrefixRequest) (*kubeconfigstorev1.GetContextPrefixResponse, error)
- func (m *GRPCServer) GetID(ctx context.Context, req *kubeconfigstorev1.GetIDRequest) (*kubeconfigstorev1.GetIDResponse, error)
- func (m *GRPCServer) GetKubeconfigForPath(ctx context.Context, req *kubeconfigstorev1.GetKubeconfigForPathRequest) (*kubeconfigstorev1.GetKubeconfigForPathResponse, error)
- func (m *GRPCServer) StartSearch(req *kubeconfigstorev1.StartSearchRequest, ...) error
- func (m *GRPCServer) VerifyKubeconfigPaths(ctx context.Context, req *kubeconfigstorev1.VerifyKubeconfigPathsRequest) (*kubeconfigstorev1.VerifyKubeconfigPathsResponse, error)
- type Store
- type StorePlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "KUBESWITCH_PLUGIN",
MagicCookieValue: "kubeswitch",
}
View Source
var PluginMap = map[string]plugin.Plugin{ "store": &StorePlugin{}, }
PluginMap is the map of plugins we can dispense.
Functions ¶
This section is empty.
Types ¶
type GRPCClient ¶
type GRPCClient struct {
Store
// contains filtered or unexported fields
}
func (*GRPCClient) GetContextPrefix ¶
func (*GRPCClient) GetKubeconfigForPath ¶
func (*GRPCClient) StartSearch ¶
func (m *GRPCClient) StartSearch(ctx context.Context, channel chan storetypes.SearchResult)
func (*GRPCClient) VerifyKubeconfigPaths ¶
func (m *GRPCClient) VerifyKubeconfigPaths(ctx context.Context) error
type GRPCServer ¶
type GRPCServer struct {
// This is the real implementation
Impl Store
}
func (*GRPCServer) GetContextPrefix ¶
func (m *GRPCServer) GetContextPrefix( ctx context.Context, req *kubeconfigstorev1.GetContextPrefixRequest, ) (*kubeconfigstorev1.GetContextPrefixResponse, error)
func (*GRPCServer) GetID ¶
func (m *GRPCServer) GetID( ctx context.Context, req *kubeconfigstorev1.GetIDRequest, ) (*kubeconfigstorev1.GetIDResponse, error)
func (*GRPCServer) GetKubeconfigForPath ¶
func (m *GRPCServer) GetKubeconfigForPath( ctx context.Context, req *kubeconfigstorev1.GetKubeconfigForPathRequest, ) (*kubeconfigstorev1.GetKubeconfigForPathResponse, error)
func (*GRPCServer) StartSearch ¶
func (m *GRPCServer) StartSearch( req *kubeconfigstorev1.StartSearchRequest, stream kubeconfigstorev1.KubeconfigStoreService_StartSearchServer, ) error
func (*GRPCServer) VerifyKubeconfigPaths ¶
func (m *GRPCServer) VerifyKubeconfigPaths( ctx context.Context, req *kubeconfigstorev1.VerifyKubeconfigPathsRequest, ) (*kubeconfigstorev1.VerifyKubeconfigPathsResponse, error)
type Store ¶
type Store interface {
GetID(ctx context.Context) (string, error)
GetContextPrefix(ctx context.Context, path string) (string, error)
VerifyKubeconfigPaths(ctx context.Context) error
StartSearch(ctx context.Context, channel chan storetypes.SearchResult)
GetKubeconfigForPath(ctx context.Context, path string, tags map[string]string) ([]byte, error)
}
type StorePlugin ¶
type StorePlugin struct {
plugin.NetRPCUnsupportedPlugin
Impl Store
}
StorePlugin is the implementation of plugin.Plugin so we can serve/consume this.
func (*StorePlugin) GRPCClient ¶
func (p *StorePlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*StorePlugin) GRPCServer ¶
func (p *StorePlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.