Documentation
¶
Overview ¶
Package codeguruprofiler implements the AWS CodeGuru Profiler service.
Index ¶
- type AgentOrchestrationConfig
- type AggregatedProfileTime
- type CreateProfilingGroupInput
- type ErrorResponse
- type ListProfilingGroupsResponse
- type MemoryStorage
- func (m *MemoryStorage) Close() error
- func (m *MemoryStorage) CreateProfilingGroup(input *CreateProfilingGroupInput) *ProfilingGroup
- func (m *MemoryStorage) DeleteProfilingGroup(name string) error
- func (m *MemoryStorage) DescribeProfilingGroup(name string) (*ProfilingGroup, error)
- func (m *MemoryStorage) ListProfilingGroups() []ProfilingGroup
- func (m *MemoryStorage) MarshalJSON() ([]byte, error)
- func (m *MemoryStorage) UnmarshalJSON(data []byte) error
- func (m *MemoryStorage) UpdateProfilingGroup(name string, input *UpdateProfilingGroupInput) (*ProfilingGroup, error)
- type Option
- type ProfilingGroup
- type ProfilingStatus
- type Service
- func (s *Service) Close() error
- func (s *Service) CreateProfilingGroup(w http.ResponseWriter, r *http.Request)
- func (s *Service) DeleteProfilingGroup(w http.ResponseWriter, r *http.Request)
- func (s *Service) DescribeProfilingGroup(w http.ResponseWriter, r *http.Request)
- func (s *Service) ListProfilingGroups(w http.ResponseWriter, _ *http.Request)
- func (s *Service) Name() string
- func (s *Service) Prefix() string
- func (s *Service) RegisterRoutes(r service.Router)
- func (s *Service) UpdateProfilingGroup(w http.ResponseWriter, r *http.Request)
- type Storage
- type UpdateProfilingGroupInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentOrchestrationConfig ¶
type AgentOrchestrationConfig struct {
ProfilingEnabled bool `json:"profilingEnabled"`
}
AgentOrchestrationConfig represents agent orchestration configuration.
type AggregatedProfileTime ¶
type AggregatedProfileTime struct {
Period string `json:"period,omitempty"`
Start time.Time `json:"start,omitzero"`
}
AggregatedProfileTime represents an aggregated profile time.
type CreateProfilingGroupInput ¶
type CreateProfilingGroupInput struct {
AgentOrchestrationConfig *AgentOrchestrationConfig `json:"agentOrchestrationConfig,omitempty"`
ComputePlatform string `json:"computePlatform,omitempty"`
ProfilingGroupName string `json:"profilingGroupName"`
Tags map[string]string `json:"tags,omitempty"`
}
CreateProfilingGroupInput represents the request body for CreateProfilingGroup.
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
ErrorResponse represents an error response.
type ListProfilingGroupsResponse ¶
type ListProfilingGroupsResponse struct {
ProfilingGroupNames []string `json:"profilingGroupNames"`
ProfilingGroups []ProfilingGroup `json:"profilingGroups"`
NextToken string `json:"nextToken,omitempty"`
}
ListProfilingGroupsResponse represents the response for ListProfilingGroups.
type MemoryStorage ¶
type MemoryStorage struct {
Groups map[string]*ProfilingGroup `json:"groups"`
// contains filtered or unexported fields
}
MemoryStorage is an in-memory implementation of Storage.
func NewMemoryStorage ¶
func NewMemoryStorage(opts ...Option) *MemoryStorage
NewMemoryStorage creates a new in-memory storage.
func (*MemoryStorage) Close ¶ added in v0.6.0
func (m *MemoryStorage) Close() error
Close saves the storage state to disk if persistence is enabled.
func (*MemoryStorage) CreateProfilingGroup ¶
func (m *MemoryStorage) CreateProfilingGroup(input *CreateProfilingGroupInput) *ProfilingGroup
CreateProfilingGroup creates a new profiling group.
func (*MemoryStorage) DeleteProfilingGroup ¶
func (m *MemoryStorage) DeleteProfilingGroup(name string) error
DeleteProfilingGroup deletes a profiling group by name.
func (*MemoryStorage) DescribeProfilingGroup ¶
func (m *MemoryStorage) DescribeProfilingGroup(name string) (*ProfilingGroup, error)
DescribeProfilingGroup returns a profiling group by name.
func (*MemoryStorage) ListProfilingGroups ¶
func (m *MemoryStorage) ListProfilingGroups() []ProfilingGroup
ListProfilingGroups returns all profiling groups.
func (*MemoryStorage) MarshalJSON ¶ added in v0.6.0
func (m *MemoryStorage) MarshalJSON() ([]byte, error)
MarshalJSON serializes the storage state to JSON.
func (*MemoryStorage) UnmarshalJSON ¶ added in v0.6.0
func (m *MemoryStorage) UnmarshalJSON(data []byte) error
UnmarshalJSON restores the storage state from JSON.
func (*MemoryStorage) UpdateProfilingGroup ¶
func (m *MemoryStorage) UpdateProfilingGroup(name string, input *UpdateProfilingGroupInput) (*ProfilingGroup, error)
UpdateProfilingGroup updates a profiling group.
type Option ¶ added in v0.6.0
type Option func(*MemoryStorage)
Option is a configuration option for MemoryStorage.
func WithDataDir ¶ added in v0.6.0
WithDataDir enables persistent storage in the specified directory.
type ProfilingGroup ¶
type ProfilingGroup struct {
AgentOrchestrationConfig *AgentOrchestrationConfig `json:"agentOrchestrationConfig,omitempty"`
Arn string `json:"arn"`
ComputePlatform string `json:"computePlatform"`
CreatedAt time.Time `json:"createdAt"`
Name string `json:"name"`
ProfilingStatus *ProfilingStatus `json:"profilingStatus,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
}
ProfilingGroup represents a CodeGuru Profiler profiling group.
type ProfilingStatus ¶
type ProfilingStatus struct {
LatestAgentOrchestratedAt *time.Time `json:"latestAgentOrchestratedAt,omitempty"`
LatestAgentProfileReportedAt *time.Time `json:"latestAgentProfileReportedAt,omitempty"`
LatestAggregatedProfile *AggregatedProfileTime `json:"latestAggregatedProfile,omitempty"`
}
ProfilingStatus represents the profiling status.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the AWS CodeGuru Profiler service.
func (*Service) CreateProfilingGroup ¶
func (s *Service) CreateProfilingGroup(w http.ResponseWriter, r *http.Request)
CreateProfilingGroup handles POST /profilingGroups.
func (*Service) DeleteProfilingGroup ¶
func (s *Service) DeleteProfilingGroup(w http.ResponseWriter, r *http.Request)
DeleteProfilingGroup handles DELETE /profilingGroups/{profilingGroupName}.
func (*Service) DescribeProfilingGroup ¶
func (s *Service) DescribeProfilingGroup(w http.ResponseWriter, r *http.Request)
DescribeProfilingGroup handles GET /profilingGroups/{profilingGroupName}.
func (*Service) ListProfilingGroups ¶
func (s *Service) ListProfilingGroups(w http.ResponseWriter, _ *http.Request)
ListProfilingGroups handles GET /profilingGroups.
func (*Service) RegisterRoutes ¶
RegisterRoutes registers routes with the router.
func (*Service) UpdateProfilingGroup ¶
func (s *Service) UpdateProfilingGroup(w http.ResponseWriter, r *http.Request)
UpdateProfilingGroup handles PUT /profilingGroups/{profilingGroupName}.
type Storage ¶
type Storage interface {
CreateProfilingGroup(input *CreateProfilingGroupInput) *ProfilingGroup
DescribeProfilingGroup(name string) (*ProfilingGroup, error)
UpdateProfilingGroup(name string, input *UpdateProfilingGroupInput) (*ProfilingGroup, error)
DeleteProfilingGroup(name string) error
ListProfilingGroups() []ProfilingGroup
}
Storage defines the interface for CodeGuru Profiler storage operations.
type UpdateProfilingGroupInput ¶
type UpdateProfilingGroupInput struct {
AgentOrchestrationConfig *AgentOrchestrationConfig `json:"agentOrchestrationConfig"`
}
UpdateProfilingGroupInput represents the request body for UpdateProfilingGroup.