Documentation
¶
Index ¶
- type ContainerLogLineResource
- type ContainerLogSessionId
- type GetContainerLogsRequest
- type GetContainerLogsResponse
- type GetResourceEventsRequest
- type GetResourceEventsResponse
- type GetResourceManifestRequest
- type GetResourceManifestResponse
- type KubernetesEventResource
- type LiveResourceDiff
- type MonitorErrorResource
- type ResourceEventsSessionId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerLogLineResource ¶
type ContainerLogLineResource struct {
Timestamp time.Time `json:"timestamp" validate:"required"`
Message string `json:"message" validate:"required"`
}
ContainerLogLineResource represents a single container log line
func NewContainerLogLineResource ¶
func NewContainerLogLineResource(timestamp time.Time, message string) *ContainerLogLineResource
NewContainerLogLineResource creates a new ContainerLogLineResource
func (*ContainerLogLineResource) Validate ¶
func (c *ContainerLogLineResource) Validate() error
Validate checks the state of the log line resource and returns an error if invalid
type ContainerLogSessionId ¶
type ContainerLogSessionId string
ContainerLogSessionId represents a container logs session identifier
type GetContainerLogsRequest ¶
type GetContainerLogsRequest struct {
SpaceID string `json:"spaceId" validate:"required"`
SessionID ContainerLogSessionId `json:"sessionId" validate:"required" uri:"sessionId" url:"sessionId"`
}
GetContainerLogsRequest represents a request to get container logs for a session Request for retrieving all the logs for the specified session
func NewGetContainerLogsRequest ¶
func NewGetContainerLogsRequest(spaceID string, sessionID ContainerLogSessionId) *GetContainerLogsRequest
NewGetContainerLogsRequest creates a new GetContainerLogsRequest
func (*GetContainerLogsRequest) Validate ¶
func (r *GetContainerLogsRequest) Validate() error
Validate checks the state of the request and returns an error if invalid
type GetContainerLogsResponse ¶
type GetContainerLogsResponse struct {
Logs []ContainerLogLineResource `json:"logs" validate:"required"`
IsSessionCompleted bool `json:"isSessionCompleted"`
Error *MonitorErrorResource `json:"error,omitempty"`
}
GetContainerLogsResponse represents the response containing logs for a sessionID Response containing the logs for a sessionID
func GetContainerLogsWithClient ¶
func GetContainerLogsWithClient(client newclient.Client, request *GetContainerLogsRequest) (*GetContainerLogsResponse, error)
GetContainerLogsWithClient retrieves container logs using the new client implementation
func NewGetContainerLogsResponse ¶
func NewGetContainerLogsResponse(logs []ContainerLogLineResource, isSessionCompleted bool) *GetContainerLogsResponse
NewGetContainerLogsResponse creates a new GetContainerLogsResponse
func (*GetContainerLogsResponse) Validate ¶
func (r *GetContainerLogsResponse) Validate() error
Validate checks the state of the response and returns an error if invalid
type GetResourceEventsRequest ¶
type GetResourceEventsRequest struct {
SpaceID string `json:"spaceId" validate:"required"`
SessionID ResourceEventsSessionId `json:"sessionId" validate:"required" uri:"sessionId" url:"sessionId"`
}
GetResourceEventsRequest represents a request to get resource events for a session Request for retrieving all the events for the specified session
func NewGetResourceEventsRequest ¶
func NewGetResourceEventsRequest(spaceID string, sessionID ResourceEventsSessionId) *GetResourceEventsRequest
NewGetResourceEventsRequest creates a new GetResourceEventsRequest
func (*GetResourceEventsRequest) Validate ¶
func (r *GetResourceEventsRequest) Validate() error
Validate checks the state of the request and returns an error if invalid
type GetResourceEventsResponse ¶
type GetResourceEventsResponse struct {
Events []KubernetesEventResource `json:"events" validate:"required"`
IsSessionCompleted bool `json:"isSessionCompleted"`
Error *MonitorErrorResource `json:"error,omitempty"`
}
GetResourceEventsResponse represents the response containing events for a sessionID Response containing the events for a sessionID
func GetResourceEventsWithClient ¶
func GetResourceEventsWithClient(client newclient.Client, request *GetResourceEventsRequest) (*GetResourceEventsResponse, error)
GetResourceEventsWithClient retrieves resource events using the new client implementation
func NewGetResourceEventsResponse ¶
func NewGetResourceEventsResponse(events []KubernetesEventResource, isSessionCompleted bool) *GetResourceEventsResponse
NewGetResourceEventsResponse creates a new GetResourceEventsResponse
func (*GetResourceEventsResponse) Validate ¶
func (r *GetResourceEventsResponse) Validate() error
Validate checks the state of the response and returns an error if invalid
type GetResourceManifestRequest ¶
type GetResourceManifestRequest struct {
SpaceID string `json:"spaceId" validate:"required"`
ProjectID string `json:"projectId" validate:"required" uri:"projectId" url:"projectId"`
EnvironmentID string `json:"environmentId" validate:"required" uri:"environmentId" url:"environmentId"`
MachineID string `json:"machineId" validate:"required" uri:"machineId" url:"machineId"`
DesiredOrKubernetesMonitoredResourceID string `` /* 155-byte string literal not displayed */
TenantID string `json:"tenantId,omitempty" uri:"tenantId,omitempty" url:"tenantId,omitempty"`
}
GetResourceManifestRequest represents a request to get a resource manifest Request for retrieving the manifest for a live kubernetes resource
func NewGetResourceManifestRequest ¶
func NewGetResourceManifestRequest(spaceID, projectID, environmentID, machineID, resourceID string) *GetResourceManifestRequest
NewGetResourceManifestRequest creates a new GetResourceManifestRequest for untenanted resources
func NewGetResourceManifestRequestWithTenant ¶
func NewGetResourceManifestRequestWithTenant(spaceID, projectID, environmentID, tenantID, machineID, resourceID string) *GetResourceManifestRequest
NewGetResourceManifestRequestWithTenant creates a new GetResourceManifestRequest for tenanted resources
func (*GetResourceManifestRequest) IsTenanted ¶
func (r *GetResourceManifestRequest) IsTenanted() bool
IsTenanted returns true if the request is for a tenanted resource
func (*GetResourceManifestRequest) Validate ¶
func (r *GetResourceManifestRequest) Validate() error
Validate checks the state of the request and returns an error if invalid
type GetResourceManifestResponse ¶
type GetResourceManifestResponse struct {
LiveManifest string `json:"liveManifest" validate:"required"`
DesiredManifest string `json:"desiredManifest,omitempty"`
Diff *LiveResourceDiff `json:"diff,omitempty"`
}
GetResourceManifestResponse represents the response from getting a resource manifest Contains the manifest for a live resource
func GetResourceManifestWithClient ¶
func GetResourceManifestWithClient(client newclient.Client, request *GetResourceManifestRequest) (*GetResourceManifestResponse, error)
GetResourceManifestWithClient retrieves a resource manifest using the new client implementation
func NewGetResourceManifestResponse ¶
func NewGetResourceManifestResponse(liveManifest string) *GetResourceManifestResponse
NewGetResourceManifestResponse creates a new GetResourceManifestResponse with required LiveManifest
func (*GetResourceManifestResponse) Validate ¶
func (r *GetResourceManifestResponse) Validate() error
Validate checks the state of the response and returns an error if invalid
type KubernetesEventResource ¶
type KubernetesEventResource struct {
FirstObservedTime time.Time `json:"firstObservedTime" validate:"required"`
LastObservedTime time.Time `json:"lastObservedTime" validate:"required"`
Count int `json:"count" validate:"required"`
Action string `json:"action" validate:"required"`
Reason string `json:"reason" validate:"required"`
Note string `json:"note" validate:"required"`
ReportingController string `json:"reportingController" validate:"required"`
ReportingInstance string `json:"reportingInstance" validate:"required"`
Type string `json:"type" validate:"required"`
Manifest string `json:"manifest" validate:"required"`
}
KubernetesEventResource represents a Kubernetes event resource
func NewKubernetesEventResource ¶
func NewKubernetesEventResource( firstObservedTime time.Time, lastObservedTime time.Time, count int, action string, reason string, note string, reportingController string, reportingInstance string, eventType string, manifest string, ) *KubernetesEventResource
NewKubernetesEventResource creates a new KubernetesEventResource
func (*KubernetesEventResource) Validate ¶
func (k *KubernetesEventResource) Validate() error
Validate checks the state of the event resource and returns an error if invalid
type LiveResourceDiff ¶
type LiveResourceDiff struct {
Left string `json:"left" validate:"required"`
Right string `json:"right" validate:"required"`
Diff string `json:"diff" validate:"required"`
}
LiveResourceDiff represents the diff between desired and live resource manifests
func NewLiveResourceDiff ¶
func NewLiveResourceDiff(left, right, diff string) *LiveResourceDiff
NewLiveResourceDiff creates a new LiveResourceDiff
func (*LiveResourceDiff) Validate ¶
func (d *LiveResourceDiff) Validate() error
Validate checks the state of the diff and returns an error if invalid
type MonitorErrorResource ¶
type MonitorErrorResource struct {
Message string `json:"message" validate:"required"`
Code string `json:"code,omitempty"`
}
MonitorErrorResource represents an error resource for monitoring operations
func NewMonitorErrorResource ¶
func NewMonitorErrorResource(message string, code string) *MonitorErrorResource
NewMonitorErrorResource creates a new MonitorErrorResource
func (*MonitorErrorResource) Validate ¶
func (e *MonitorErrorResource) Validate() error
Validate checks the state of the error resource and returns an error if invalid
type ResourceEventsSessionId ¶
type ResourceEventsSessionId string
ResourceEventsSessionId represents a resource events session identifier