Documentation ¶
Index ¶
- type AnalyzeOption
- type Client
- type Config
- type Controller
- type RiskController
- type Server
- func (s *Server) Analyze(option AnalyzeOption)
- func (s *Server) Clear()
- func (s *Server) Run(address string)
- func (s *Server) WithAdapter(Adapter providers.Adapter) *Server
- func (s *Server) WithContext(ctx context.Context) *Server
- func (s *Server) WithPolicy(policy *v1alpha1.InspectionPolicy) *Server
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyzeOption ¶
type AnalyzeOption struct { //DumpAssessReport bool SkipImages []string }
AnalyzeOption analyze option
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client to post requests
func (*Client) IsAnalyzeRunning ¶
IsAnalyzeRunning get analyze status
func (*Client) PostAnalyze ¶
func (c *Client) PostAnalyze(a AnalyzeOption) error
PostAnalyze ask server to analyze resources
func (*Client) PostResource ¶
func (*Client) SendExitInstruction ¶
SendExitInstruction send exit instruction
type Controller ¶
type Controller interface { // Run inspection. Run(ctx context.Context, policy *v1alpha1.InspectionPolicy) error }
Controller controls the inspection flow.
type RiskController ¶
type RiskController struct {
// contains filtered or unexported fields
}
func (*RiskController) CTRL ¶
func (c *RiskController) CTRL() Controller
CTRL returns RiskController interface.
func (*RiskController) Run ¶
func (c *RiskController) Run(ctx context.Context, policy *v1alpha1.InspectionPolicy) error
func (*RiskController) WithK8sClient ¶
func (c *RiskController) WithK8sClient(cli client.Client) *RiskController
WithK8sClient sets k8s client.
func (*RiskController) WithScheme ¶
func (c *RiskController) WithScheme(scheme *runtime.Scheme) *RiskController
WithScheme sets runtime scheme.
type Server ¶
type Server struct { Workloads riskdata.Workloads Evaluator riskdata.Evaluator IsRunning bool Images map[string]*riskdata.ImageItem Last int64 // contains filtered or unexported fields }
Server the server
func (*Server) Analyze ¶
func (s *Server) Analyze(option AnalyzeOption)
func (*Server) WithAdapter ¶
WithAdapter sets adapter.
func (*Server) WithPolicy ¶
func (s *Server) WithPolicy(policy *v1alpha1.InspectionPolicy) *Server
WithPolicy sets the policy
Click to show internal directories.
Click to hide internal directories.