RootOptions
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| Scope | promutils.Scope | Defines the scope for Prometheus utilities, affecting how metrics are collected and reported. |
| Store | *storage.DataStore | Holds a pointer to the data store, used for persistent storage and retrieval of data. |
Methods
executeRootCmd()
@classmethod
def executeRootCmd() - > error
Executes the root command. This method is typically the entry point for the application's command-line interface.
Returns
| Type | Description |
|---|---|
error | An error if the command execution fails, otherwise nil. |
UploadError()
@classmethod
def UploadError(
ctx: context.Context,
code: string,
recvErr: error,
prefix: storage.DataReference
) - > error
Uploads an error document to a specified storage location. This method is used to persist details about an error that occurred during an operation.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the upload operation, allowing for cancellation and timeouts. |
| code | string | The error code associated with the encountered error. |
| recvErr | error | The actual error object that was received and needs to be uploaded. |
| prefix | storage.DataReference | The storage prefix where the error document should be uploaded. |
Returns
| Type | Description |
|---|---|
error | An error if the upload operation fails, otherwise nil. |
initConfig()
@classmethod
def initConfig(
cmd: *cobra.Command,
_: []string
) - > error
Initializes the configuration for the command-line application. This method sets up the necessary configuration parameters before command execution.
Parameters
| Name | Type | Description |
|---|---|---|
| cmd | *cobra.Command | The Cobra command for which the configuration is being initialized. |
| _ | []string | Unused parameter, typically representing command-line arguments. |
Returns
| Type | Description |
|---|---|
error | An error if configuration initialization fails, otherwise nil. |