plugins

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "KSWITCH_PLUGIN",
	MagicCookieValue: "kswitch",
}
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 (m *GRPCClient) GetContextPrefix(ctx context.Context, path string) (string, error)

func (*GRPCClient) GetID

func (m *GRPCClient) GetID(ctx context.Context) (string, error)

func (*GRPCClient) GetKubeconfigForPath

func (m *GRPCClient) GetKubeconfigForPath(ctx context.Context, path string, tags map[string]string) ([]byte, error)

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) GetID

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

Directories

Path Synopsis
kubeconfigstore
v1

Jump to

Keyboard shortcuts

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