Documentation ¶
Index ¶
- Variables
- type Retriever
- func (r *Retriever) CallContents(req *http.Request) (types.ContentsResponse, error)
- func (r *Retriever) CallInsights(req *http.Request, cluster types.ManagedClusterInfo) (types.ResponseBody, error)
- func (r *Retriever) CreateContents(responseBody types.ContentsResponse)
- func (r *Retriever) CreateInsightContentConfigmap(dynamicClient dynamic.Interface)
- func (r *Retriever) CreateInsightsRequest(ctx context.Context, endpoint string, cluster types.ManagedClusterInfo, ...) (*http.Request, error)
- func (r *Retriever) FetchClusters(monitor *monitor.Monitor, input chan types.ManagedClusterInfo, ...)
- func (r *Retriever) GetContentConfigMap(dynamicClient dynamic.Interface) *unstructured.Unstructured
- func (r *Retriever) GetContentRequest(ctx context.Context, hubID string) (*http.Request, error)
- func (r *Retriever) GetContents(errorKey string, key string) interface{}
- func (r *Retriever) GetFields(errorKey string) []string
- func (r *Retriever) GetPolicyInfo(responseBody types.ResponseBody, cluster types.ManagedClusterInfo) (types.ProcessorData, error)
- func (r *Retriever) InitializeContents(hubID string, dynamicClient dynamic.Interface) int
- func (r *Retriever) RetrieveReport(hubID string, input chan types.ManagedClusterInfo, ...)
- func (r *Retriever) StartTokenRefresh() error
Constants ¶
This section is empty.
Variables ¶
var ContentsMap map[string]map[string]interface{}
ContentsMap contains all policy data
Functions ¶
This section is empty.
Types ¶
type Retriever ¶
type Retriever struct { CCXUrl string ContentURL string Client *http.Client Token string // token to connect to CRC DisconnectedEnv bool }
Retriever struct
func NewRetriever ¶
NewRetriever ...
func (*Retriever) CallContents ¶
CallContents - Makes HTTP call to get contents
func (*Retriever) CallInsights ¶
func (r *Retriever) CallInsights(req *http.Request, cluster types.ManagedClusterInfo) (types.ResponseBody, error)
CallInsights ...
func (*Retriever) CreateContents ¶
func (r *Retriever) CreateContents(responseBody types.ContentsResponse)
CreateContents - Populate json response from /contents call onto a Map to quick lookup
func (*Retriever) CreateInsightContentConfigmap ¶
CreateInsightContentConfigmap Creates a configmap to store content data in open-cluster-management namespace
func (*Retriever) CreateInsightsRequest ¶
func (r *Retriever) CreateInsightsRequest( ctx context.Context, endpoint string, cluster types.ManagedClusterInfo, hubID string, ) (*http.Request, error)
CreateInsightsRequest ...
func (*Retriever) FetchClusters ¶
func (r *Retriever) FetchClusters( monitor *monitor.Monitor, input chan types.ManagedClusterInfo, refreshToken bool, hubID string, dynamicClient dynamic.Interface, )
FetchClusters forwards the managed clusters to RetrieveCCXReports function
func (*Retriever) GetContentConfigMap ¶
func (r *Retriever) GetContentConfigMap(dynamicClient dynamic.Interface) *unstructured.Unstructured
GetContentConfigMap ...
func (*Retriever) GetContentRequest ¶
GetContentRequest - Creates GET request for contents
func (*Retriever) GetContents ¶
GetContents - Given Error_Key and field name returns value
func (*Retriever) GetPolicyInfo ¶
func (r *Retriever) GetPolicyInfo( responseBody types.ResponseBody, cluster types.ManagedClusterInfo, ) (types.ProcessorData, error)
GetPolicyInfo ...
func (*Retriever) InitializeContents ¶
InitializeContents ...
func (*Retriever) RetrieveReport ¶
func (r *Retriever) RetrieveReport( hubID string, input chan types.ManagedClusterInfo, output chan types.ProcessorData, clusterCCXMap map[string]bool, isDisconnected bool, )
RetrieveReport ...
func (*Retriever) StartTokenRefresh ¶
StartTokenRefresh sets the CRC token for use in Insights queries