Documentation ¶
Overview ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func AwaitConnectorInput() (bool, bool, []int)
- func AwaitConnectorTaskInput() (int, int)
- func AwaitUserConfirm() bool
- func Execute()
- func ExecuteConnectorOp(op Operation, host string, port string, connectorName string)
- func ExecuteOp(op Operation, host string, port string, connector Connector)
- func FormatPollInterval(pollIntervalMs int) string
- func FormatState(state string) string
- func FormatStatus(status string, statusCode int) string
- func GetConnectorConfig(host string, port string, connectorName string) map[string]string
- func GetConnectorTasks(host string, port string, connector string) map[int]TaskStatus
- func GetConnectorsDetails(host string, port string, connectors map[int]Connector) map[int]Connector
- func GetConnectorsList(host string, port string) []string
- func GetConnectorsMap(host string, port string) map[int]Connector
- func GetPersistentFlags(cmd *cobra.Command) (string, string)
- func HasCaseInsensitivePrefix(s string, prefix string) bool
- func List(cmd *cobra.Command, args []string) map[int]Connector
- func LoadConfig(client *retryablehttp.Client, host string, port string, configFile ConfigFile) *http.Response
- type ConfigFile
- type Connector
- type ConnectorDetails
- type ConnectorState
- type ConnectorStatus
- type DiffResult
- type DiffResults
- type MismatchVals
- type Operation
- type TaskState
- type TaskStatus
- type TaskStatusConfig
- type TaskStatusId
- type ValidationResponse
- type ValidationResponseField
- type ValidationResponseFieldValue
Constants ¶
This section is empty.
Variables ¶
var Blue = "\033[34m"
var Cyan = "\033[36m"
var Gray = "\033[38m"
var Green = "\033[32m"
var Purple = "\033[35m"
var Red = "\033[31m"
var Reset = "\033[0m"
var White = "\033[97m"
var Yellow = "\033[33m"
Functions ¶
func AwaitConnectorInput ¶ added in v0.0.2
AwaitConnectorInput prompts the user for input A connector can be selected by entering a connector id e.g > 4 Which will result in a return value of 4
func AwaitConnectorTaskInput ¶ added in v0.0.2
AwaitConnectorTaskInput prompts the user for input A connector can be selected by entering a connector id e.g > 4 Which will result in a return value of 4, -1 Or a connector and task can be selected by entering e.g > 5.2 Which will result in a return value of 5, 2
func AwaitUserConfirm ¶ added in v0.0.2
func AwaitUserConfirm() bool
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ExecuteConnectorOp ¶ added in v0.0.19
func FormatPollInterval ¶ added in v0.0.2
func FormatState ¶ added in v0.0.16
func FormatStatus ¶ added in v0.0.26
func GetConnectorConfig ¶ added in v0.0.2
GetConnectorConfig gets the connector config
func GetConnectorTasks ¶ added in v0.0.2
func GetConnectorTasks(host string, port string, connector string) map[int]TaskStatus
func GetConnectorsDetails ¶ added in v0.0.2
func GetConnectorsList ¶ added in v0.0.31
func GetConnectorsMap ¶ added in v0.0.2
GetConnectorsMap returns a map of connectorId -> connectorName The connectorId is based on the alphabetically sorted connectorNames
func HasCaseInsensitivePrefix ¶ added in v0.0.22
func LoadConfig ¶ added in v0.0.4
func LoadConfig(client *retryablehttp.Client, host string, port string, configFile ConfigFile) *http.Response
Types ¶
type ConfigFile ¶ added in v0.0.4
type ConfigFile struct { FileName string ConnectorName string ConnectorClass string PluginClass string Config map[string]string ConfigBytes []byte ValidationResp ValidationResponse LoadResp *http.Response Error error }
func (*ConfigFile) FormattedStatus ¶ added in v0.0.26
func (cf *ConfigFile) FormattedStatus() string
func (*ConfigFile) Read ¶ added in v0.0.4
func (cf *ConfigFile) Read()
type Connector ¶ added in v0.0.2
type Connector struct { Id int Name string Details ConnectorDetails }
func (Connector) PollInterval ¶ added in v0.0.2
type ConnectorDetails ¶ added in v0.0.2
type ConnectorDetails struct { Name string Config map[string]string Connector ConnectorState Tasks []TaskState }
func GetConnectorDetails ¶ added in v0.0.2
func GetConnectorDetails(host string, port string, connectorId int, connectorName string) ConnectorDetails
GetConnectorDetails gets all connector and task statuses and config for a given connectorName
func GetConnectorStatus ¶
func GetConnectorStatus(host string, port string, connectorName string) ConnectorDetails
GetConnectorStatus gets the connector status
type ConnectorState ¶
func (ConnectorState) FormattedState ¶ added in v0.0.16
func (c ConnectorState) FormattedState() string
type ConnectorStatus ¶
type ConnectorStatus struct { ConnectorId int Name string Connector ConnectorState Tasks []TaskState }
type DiffResult ¶ added in v0.0.28
type DiffResults ¶ added in v0.0.28
type MismatchVals ¶ added in v0.0.28
type TaskState ¶
type TaskState struct { Id int State string WorkerId string `json:"worker_id"` Trace string Config map[string]string }
func (TaskState) FormattedState ¶ added in v0.0.16
type TaskStatus ¶ added in v0.0.2
type TaskStatus struct { Id TaskStatusId Config map[string]string }
type TaskStatusConfig ¶ added in v0.0.2
type TaskStatusId ¶ added in v0.0.2
type ValidationResponse ¶ added in v0.0.4
type ValidationResponse struct { ConnectorName string Name string ErrorCount int `json:"error_count"` Configs []ValidationResponseField }
func ValidateConfig ¶ added in v0.0.4
func ValidateConfig(client *retryablehttp.Client, host string, port string, configFile ConfigFile) ValidationResponse
type ValidationResponseField ¶ added in v0.0.4
type ValidationResponseField struct {
Value ValidationResponseFieldValue
}