Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
8f9b9db5
Unverified
Commit
8f9b9db5
authored
Nov 11, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(tiller): add docblocks to public methods
parent
e4bbe33e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
release_history.go
pkg/tiller/release_history.go
+1
-0
release_server.go
pkg/tiller/release_server.go
+10
-0
No files found.
pkg/tiller/release_history.go
View file @
8f9b9db5
...
...
@@ -22,6 +22,7 @@ import (
relutil
"k8s.io/helm/pkg/releaseutil"
)
// GetHistory gets the history for a given release.
func
(
s
*
ReleaseServer
)
GetHistory
(
ctx
context
.
Context
,
req
*
tpb
.
GetHistoryRequest
)
(
*
tpb
.
GetHistoryResponse
,
error
)
{
if
!
checkClientVersion
(
ctx
)
{
return
nil
,
errIncompatibleVersion
...
...
pkg/tiller/release_server.go
View file @
8f9b9db5
...
...
@@ -70,10 +70,12 @@ var (
// ListDefaultLimit is the default limit for number of items returned in a list.
var
ListDefaultLimit
int64
=
512
// ReleaseServer implements the server-side gRPC endpoint for the HAPI services.
type
ReleaseServer
struct
{
env
*
environment
.
Environment
}
// NewReleaseServer creates a new release server.
func
NewReleaseServer
(
env
*
environment
.
Environment
)
*
ReleaseServer
{
return
&
ReleaseServer
{
env
:
env
,
...
...
@@ -89,6 +91,7 @@ func getVersion(c ctx.Context) string {
return
""
}
// ListReleases lists the releases found by the server.
func
(
s
*
ReleaseServer
)
ListReleases
(
req
*
services
.
ListReleasesRequest
,
stream
services
.
ReleaseService_ListReleasesServer
)
error
{
if
!
checkClientVersion
(
stream
.
Context
())
{
return
errIncompatibleVersion
...
...
@@ -191,6 +194,7 @@ func filterReleases(filter string, rels []*release.Release) ([]*release.Release,
return
matches
,
nil
}
// GetVersion sends the server version.
func
(
s
*
ReleaseServer
)
GetVersion
(
c
ctx
.
Context
,
req
*
services
.
GetVersionRequest
)
(
*
services
.
GetVersionResponse
,
error
)
{
v
:=
version
.
GetVersionProto
()
return
&
services
.
GetVersionResponse
{
Version
:
v
},
nil
...
...
@@ -201,6 +205,7 @@ func checkClientVersion(c ctx.Context) bool {
return
version
.
IsCompatible
(
v
,
version
.
Version
)
}
// GetReleaseStatus gets the status information for a named release.
func
(
s
*
ReleaseServer
)
GetReleaseStatus
(
c
ctx
.
Context
,
req
*
services
.
GetReleaseStatusRequest
)
(
*
services
.
GetReleaseStatusResponse
,
error
)
{
if
!
checkClientVersion
(
c
)
{
return
nil
,
errIncompatibleVersion
...
...
@@ -256,6 +261,7 @@ func (s *ReleaseServer) GetReleaseStatus(c ctx.Context, req *services.GetRelease
return
statusResp
,
nil
}
// GetReleaseContent gets all of the stored information for the given release.
func
(
s
*
ReleaseServer
)
GetReleaseContent
(
c
ctx
.
Context
,
req
*
services
.
GetReleaseContentRequest
)
(
*
services
.
GetReleaseContentResponse
,
error
)
{
if
!
checkClientVersion
(
c
)
{
return
nil
,
errIncompatibleVersion
...
...
@@ -273,6 +279,7 @@ func (s *ReleaseServer) GetReleaseContent(c ctx.Context, req *services.GetReleas
return
&
services
.
GetReleaseContentResponse
{
Release
:
rel
},
err
}
// UpdateRelease takes an existing release and new information, and upgrades the release.
func
(
s
*
ReleaseServer
)
UpdateRelease
(
c
ctx
.
Context
,
req
*
services
.
UpdateReleaseRequest
)
(
*
services
.
UpdateReleaseResponse
,
error
)
{
if
!
checkClientVersion
(
c
)
{
return
nil
,
errIncompatibleVersion
...
...
@@ -404,6 +411,7 @@ func (s *ReleaseServer) prepareUpdate(req *services.UpdateReleaseRequest) (*rele
return
currentRelease
,
updatedRelease
,
nil
}
// RollbackRelease rolls back to a previous version of the given release.
func
(
s
*
ReleaseServer
)
RollbackRelease
(
c
ctx
.
Context
,
req
*
services
.
RollbackReleaseRequest
)
(
*
services
.
RollbackReleaseResponse
,
error
)
{
if
!
checkClientVersion
(
c
)
{
return
nil
,
errIncompatibleVersion
...
...
@@ -587,6 +595,7 @@ func (s *ReleaseServer) engine(ch *chart.Chart) environment.Engine {
return
renderer
}
// InstallRelease installs a release and stores the release record.
func
(
s
*
ReleaseServer
)
InstallRelease
(
c
ctx
.
Context
,
req
*
services
.
InstallReleaseRequest
)
(
*
services
.
InstallReleaseResponse
,
error
)
{
if
!
checkClientVersion
(
c
)
{
return
nil
,
errIncompatibleVersion
...
...
@@ -855,6 +864,7 @@ func (s *ReleaseServer) purgeReleases(rels ...*release.Release) error {
return
nil
}
// UninstallRelease deletes all of the resources associated with this release, and marks the release DELETED.
func
(
s
*
ReleaseServer
)
UninstallRelease
(
c
ctx
.
Context
,
req
*
services
.
UninstallReleaseRequest
)
(
*
services
.
UninstallReleaseResponse
,
error
)
{
if
!
checkClientVersion
(
c
)
{
return
nil
,
errIncompatibleVersion
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment