Documentation ¶
Index ¶
- Constants
- Variables
- type BotkubeRunner
- type Config
- type ConfigWithDetails
- type KubectlRunner
- func (k *KubectlRunner) DescribeResource(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- func (k *KubectlRunner) GetEvents(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- func (k *KubectlRunner) GetResource(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- func (k *KubectlRunner) Logs(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- func (k *KubectlRunner) TopNodes(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- func (k *KubectlRunner) TopPods(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- type KubescapeRunner
- func (k *KubescapeRunner) ScanCluster(ctx context.Context, _ []byte, _ *Payload) (string, error)
- func (k *KubescapeRunner) ScanControl(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- func (k *KubescapeRunner) ScanImage(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- func (k *KubescapeRunner) ScanWorkload(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
- type Payload
- type Source
Constants ¶
const (
PluginName = "ai-brain"
)
Variables ¶
var ( //go:embed config_schema.json ConfigJSONSchema string //go:embed webhook_schema.json IncomingWebhookJSONSchema string )
Functions ¶
This section is empty.
Types ¶
type BotkubeRunner ¶
type BotkubeRunner struct {
// contains filtered or unexported fields
}
BotkubeRunner is a runner that executes Botkube related commands.
func NewBotkubeRunner ¶
func NewBotkubeRunner(tracer trace.Tracer) (*BotkubeRunner, error)
NewBotkubeRunner creates new runner instance.
func (*BotkubeRunner) GetAgentStatus ¶
GetAgentStatus returns Botkube Agent health status.
func (*BotkubeRunner) GetStartupAgentConfiguration ¶
func (r *BotkubeRunner) GetStartupAgentConfiguration(ctx context.Context, _ []byte, p *Payload) (string, error)
GetStartupAgentConfiguration returns Botkube startup configuration.
type Config ¶
type Config struct { Log config.Logger `yaml:"log"` OpenAIBaseURL string `yaml:"openAIBaseURL"` OpenAIAssistantID string `yaml:"openAIAssistantId"` HoneycombAPIKey string `yaml:"honeycombAPIKey"` HoneycombSampleRate int `yaml:"honeycombSampleRate"` VectorStoreIDForThread string `yaml:"vectorStoreIDForThread"` Version string }
Config holds source configuration.
type ConfigWithDetails ¶
type ConfigWithDetails struct { *config.Config `yaml:",inline"` LoaderValidationWarnings string `yaml:"loaderValidationWarnings"` IncomingRequestPrompt string `yaml:"incomingRequestPrompt,omitempty"` }
ConfigWithDetails represents Botkube configuration with additional details.
type KubectlRunner ¶
type KubectlRunner struct {
// contains filtered or unexported fields
}
KubectlRunner is a runner that executes kubectl commands using a specific kubeconfig file.
func NewKubectlRunner ¶
func NewKubectlRunner(kubeconfigPath string, tracer trace.Tracer) *KubectlRunner
NewKubectlRunner creates new runner instance.
func (*KubectlRunner) DescribeResource ¶
func (k *KubectlRunner) DescribeResource(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
DescribeResource executes kubectl describe resource command.
func (*KubectlRunner) GetResource ¶
func (k *KubectlRunner) GetResource(ctx context.Context, rawArgs []byte, _ *Payload) (string, error)
GetResource executes kubectl get resource command.
type KubescapeRunner ¶
type KubescapeRunner struct {
// contains filtered or unexported fields
}
func NewKubescapeRunner ¶
func NewKubescapeRunner(kubeconfigPath string, tracer trace.Tracer) *KubescapeRunner
func (*KubescapeRunner) ScanCluster ¶
func (*KubescapeRunner) ScanControl ¶
func (*KubescapeRunner) ScanWorkload ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source implements AI source plugin.
func (*Source) HandleExternalRequest ¶
func (s *Source) HandleExternalRequest(ctx context.Context, in source.ExternalRequestInput) (source.ExternalRequestOutput, error)
HandleExternalRequest handles incoming payload and returns an event based on it.
func (*Source) Stream ¶
func (s *Source) Stream(ctx context.Context, in source.StreamInput) (source.StreamOutput, error)
Stream implements Botkube source plugin.