Skip to content

Commit

Permalink
update deprecated APIs to be properly shown via godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Dec 18, 2024
1 parent 79a85c8 commit d907160
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion idp-commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ type ListAccessKeysLDAPResp ListAccessKeysResp

// ListAccessKeysLDAP - list service accounts belonging to the specified user
//
// Deprecated: Use ListAccessKeysLDAP instead.
// Deprecated: Use ListAccessKeysLDAPBulk instead.
func (adm *AdminClient) ListAccessKeysLDAP(ctx context.Context, userDN string, listType string) (ListAccessKeysLDAPResp, error) {
queryValues := url.Values{}
queryValues.Set("listType", listType)
Expand Down
2 changes: 2 additions & 0 deletions metrics_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func NewMetricsClientWithOptions(endpoint string, opts *Options) (*MetricsClient
}

// NewMetricsClient - instantiate minio metrics client honoring Prometheus format
//
// Deprecated: please use NewMetricsClientWithOptions
func NewMetricsClient(endpoint string, accessKeyID, secretAccessKey string, secure bool) (*MetricsClient, error) {
return NewMetricsClientWithOptions(endpoint, &Options{
Expand Down Expand Up @@ -164,6 +165,7 @@ func (client *MetricsClient) makeTargetURL(r metricsRequestData) (*url.URL, erro
}

// SetCustomTransport - set new custom transport.
//
// Deprecated: please use Options{Transport: tr} to provide custom transport.
func (client *MetricsClient) SetCustomTransport(customHTTPTransport http.RoundTripper) {
// Set this to override default transport
Expand Down
10 changes: 6 additions & 4 deletions profiling-commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ type StartProfilingResult struct {
Error string `json:"error"`
}

// StartProfiling makes an admin call to remotely start profiling on a standalone
// server or the whole cluster in case of a distributed setup.
// StartProfiling makes an admin call to remotely start profiling on a
// standalone server or the whole cluster in case of a distributed setup.
//
// Deprecated: use Profile API instead
func (adm *AdminClient) StartProfiling(ctx context.Context, profiler ProfilerType) ([]StartProfilingResult, error) {
v := url.Values{}
Expand Down Expand Up @@ -90,8 +91,9 @@ func (adm *AdminClient) StartProfiling(ctx context.Context, profiler ProfilerTyp
return startResults, nil
}

// DownloadProfilingData makes an admin call to download profiling data of a standalone
// server or of the whole cluster in case of a distributed setup.
// DownloadProfilingData makes an admin call to download profiling data of a
// standalone server or of the whole cluster in case of a distributed setup.
//
// Deprecated: use Profile API instead
func (adm *AdminClient) DownloadProfilingData(ctx context.Context) (io.ReadCloser, error) {
path := fmt.Sprintf(adminAPIPrefix + "/profiling/download")
Expand Down
12 changes: 9 additions & 3 deletions service-commands-v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,23 @@ import (
"net/url"
)

// ServiceRestart - Deprecated: restarts the MinIO cluster
// ServiceRestart - restarts the MinIO cluster
//
// Deprecated: use ServiceRestartV2 instead
func (adm *AdminClient) ServiceRestart(ctx context.Context) error {
return adm.serviceCallAction(ctx, ServiceActionRestart)
}

// ServiceStop - Deprecated: stops the MinIO cluster
// ServiceStop - stops the MinIO cluster
//
// Deprecated: use ServiceStopV2
func (adm *AdminClient) ServiceStop(ctx context.Context) error {
return adm.serviceCallAction(ctx, ServiceActionStop)
}

// ServiceUnfreeze - Deprecated: un-freezes all incoming S3 API calls on MinIO cluster
// ServiceUnfreeze - un-freezes all incoming S3 API calls on MinIO cluster
//
// Deprecated: use ServiceUnfreezeV2
func (adm *AdminClient) ServiceUnfreeze(ctx context.Context) error {
return adm.serviceCallAction(ctx, ServiceActionUnfreeze)
}
Expand Down

0 comments on commit d907160

Please sign in to comment.