// ListReleases lists the current releases. func (h *Client) ListReleases(opts ...ReleaseListOption) (*rls.ListReleasesResponse, error) { c, err := grpc.Dial(h.opts.host, grpc.WithInsecure()) if err != nil { return nil, err } defer c.Close() return h.opts.rpcListReleases(rls.NewReleaseServiceClient(c), opts...) }
// DeleteRelease uninstalls a named release and returns the response. // // Note: there aren't currently any supported DeleteOptions, but they are // kept in the API signature as a placeholder for future additions. func (h *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) { c, err := grpc.Dial(h.opts.host, grpc.WithInsecure()) if err != nil { return nil, err } defer c.Close() return h.opts.rpcDeleteRelease(rlsName, rls.NewReleaseServiceClient(c), opts...) }
// ReleaseContent returns the configuration for a given release. // // Note: there aren't currently any supported ContentOptions, but // they are kept in the API signature as a placeholder for future additions. func (h *Client) ReleaseContent(rlsName string, opts ...ContentOption) (*rls.GetReleaseContentResponse, error) { c, err := grpc.Dial(h.opts.host, grpc.WithInsecure()) if err != nil { return nil, err } defer c.Close() return h.opts.rpcGetReleaseContent(rlsName, rls.NewReleaseServiceClient(c), opts...) }
// GetVersion returns the server version // // Note: there aren't currently any supported StatusOptions, // but they are kept in the API signature as a placeholder for future additions. func (h *Client) GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, error) { c, err := grpc.Dial(h.opts.host, grpc.WithInsecure()) if err != nil { return nil, err } defer c.Close() return h.opts.rpcGetVersion(rls.NewReleaseServiceClient(c), opts...) }
// Executes tiller.GetHistory RPC. func (h *Client) history(ctx context.Context, req *rls.GetHistoryRequest) (*rls.GetHistoryResponse, error) { c, err := grpc.Dial(h.opts.host, grpc.WithInsecure()) if err != nil { return nil, err } defer c.Close() rlc := rls.NewReleaseServiceClient(c) return rlc.GetHistory(ctx, req) }
// InstallRelease installs a new chart and returns the release response. func (h *Client) InstallRelease(chStr string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) { c, err := grpc.Dial(h.opts.host, grpc.WithInsecure()) if err != nil { return nil, err } defer c.Close() chart, err := chartutil.Load(chStr) if err != nil { return nil, err } return h.opts.rpcInstallRelease(chart, rls.NewReleaseServiceClient(c), opts...) }
// Executes tiller.ListReleases RPC. func (h *Client) list(ctx context.Context, req *rls.ListReleasesRequest) (*rls.ListReleasesResponse, error) { c, err := grpc.Dial(h.opts.host, grpc.WithInsecure()) if err != nil { return nil, err } defer c.Close() rlc := rls.NewReleaseServiceClient(c) s, err := rlc.ListReleases(ctx, req) if err != nil { return nil, err } return s.Recv() }