Versions in this module Expand all Collapse all v0 v0.1.0 Jun 11, 2024 Changes in this version + const DefaultModulePathEnv + const Dir + const KusionModuleBinaryPrefix + const PluginKey + var HandshakeConfig = plugin.HandshakeConfig + var IgnoreModules = map[string]bool + var PluginMap = map[string]plugin.Plugin + func AppendToSpec(resourceType v1.Type, resourceID string, i *v1.Spec, resource any) error + func CallGenerators(i *v1.Spec, newGenerators ...NewGeneratorFunc) error + func ForeachOrdered[T any](m map[string]T, f func(key string, value T) error) error + func GenericPtr[T any](i T) *T + func KubernetesResourceID(typeMeta metav1.TypeMeta, objectMeta metav1.ObjectMeta) string + func KusionPathDependency(id, name string) string + func MergeMaps(maps ...map[string]string) map[string]string + func NewPluginClient(modulePluginPath, moduleName string) (*plugin.Client, error) + func PatchResource[T any](resources map[string][]*v1.Resource, gvk string, patchFunc func(*T) error) error + func PluginDir() (string, error) + func UniqueAppLabels(projectName, appName string) map[string]string + func UniqueAppName(projectName, stackName, appName string) string + type GRPCClient struct + func (c *GRPCClient) Generate(ctx context.Context, req *proto.GeneratorRequest) (*proto.GeneratorResponse, error) + type GRPCPlugin struct + Impl Module + func (p *GRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) + func (p *GRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error + type GRPCServer struct + Impl Module + func (s *GRPCServer) Generate(ctx context.Context, req *proto.GeneratorRequest) (res *proto.GeneratorResponse, err error) + type Generator interface + Generate func(intent *v1.Spec) error + func CallGeneratorFuncs(newGenerators ...NewGeneratorFunc) ([]Generator, error) + type Module interface + Generate func(ctx context.Context, req *proto.GeneratorRequest) (*proto.GeneratorResponse, error) + type NewGeneratorFunc func() (Generator, error) + type Plugin struct + Module Module + func NewPlugin(key string) (*Plugin, error) + func (p *Plugin) KillPluginClient() error