Documentation ¶
Index ¶
- Constants
- Variables
- func AddAttachedListener(attachedListener AttachedListener)
- func AddAutoloadAgentPlugin(plugin string, markerClass string)
- func AddJVMListener()
- func AddListener(listener Listener)
- func DeactivateDataSourceDiscovery()
- func DeactivateSpringDiscovery()
- func GetCleanSocketCommandResult(response io.Reader) (string, error)
- func GetDiscoveryList() discovery_kit_api.DiscoveryList
- func GetJVMs() []jvm.JavaVm
- func GetTarget(pid int32) *jvm.JavaVm
- func HasAgentPlugin(jvm *jvm.JavaVm, plugin string) bool
- func HasClassLoaded(jvm *jvm.JavaVm, className string) bool
- func InitDataSourceDiscovery()
- func InitDiscovery()
- func InitSpringDiscovery()
- func InstallSignalHandler()
- func LoadAgentPlugin(jvm *jvm.JavaVm, plugin string, args string) (bool, error)
- func NewControllerDelay() action_kit_sdk.Action[ControllerDelayState]
- func NewControllerException() action_kit_sdk.Action[ControllerExceptionState]
- func NewHttpClientDelay() action_kit_sdk.Action[HttpClientDelayState]
- func NewHttpClientStatus() action_kit_sdk.Action[HttpClientStatusState]
- func NewJavaMethodDelay() action_kit_sdk.Action[JavaMethodDelayState]
- func NewJavaMethodException() action_kit_sdk.Action[JavaMethodExceptionState]
- func NewJdbcTemplateDelay() action_kit_sdk.Action[JdbcTemplateDelayState]
- func NewJdbcTemplateException() action_kit_sdk.Action[JdbcTemplateExceptionState]
- func Prepare(jvm *jvm.JavaVm, configJson string) (string, int)
- func RegisterAdviceHandlers()
- func RegisterDiscoveryHandlers()
- func RemoveAutoloadAgentPlugin(plugin string, markerClass string)
- func RemoveListener(listener Listener)
- func SendCommandToAgent(jvm *jvm.JavaVm, command string, args string) bool
- func SendCommandToAgentViaSocket[T any](jvm *jvm.JavaVm, command string, args string, ...) *T
- func Start(jvm *jvm.JavaVm, callbackUrl string) error
- func StartAttachment()
- func Stop(jvm *jvm.JavaVm) bool
- func UnloadAgentPlugin(jvm *jvm.JavaVm, plugin string) (bool, error)
- type AttachJvmWork
- type AttachedListener
- type AttackState
- type AutoloadPlugin
- type ControllerDelayState
- type ControllerExceptionState
- type ControllerState
- type DataSourceApplication
- type DataSourceConnection
- type DataSourceDiscovery
- type DataSourceDiscoverySchedulerHolder
- type HttpClientDelayState
- type HttpClientStatusState
- type HttpRequest
- type JavaExtensionFacade
- type JavaMethodDelayState
- type JavaMethodExceptionState
- type JavaVMS
- type JdbcTemplateDelayState
- type JdbcTemplateExceptionState
- type Listener
- type LoadPluginJvmWork
- type SpringApplication
- type SpringDiscovery
- type SpringMvcMapping
- type SpringVMDiscoverySchedulerHolder
Constants ¶
View Source
const (
ActionIDPrefix = "com.steadybit.extension_jvm"
)
View Source
const HttpCallCircuitBreakerID = targetID + ".advice.http-call-circuit-breaker"
View Source
const HttpCallTimeoutID = targetID + ".advice.http-call-timeout"
Variables ¶
View Source
var ( DataSourcePlugin = common.GetJarPath("discovery-java-javaagent.jar") DataSourceMarkerClass = "javax.sql.DataSource" DataSourceApplications = sync.Map{} // map[Pid int32]DataSourceApplication )
View Source
var ( JavaagentInitJar = common.GetJarPath("javaagent-init.jar") JavaagentMainJar = common.GetJarPath("javaagent-main.jar") SocketTimeout = 10 * time.Second )
View Source
var ( ClasspathExcludes = []string{"IntelliJ IDEA", "surefirebooter", "Eclipse"} CommandlineExcludes = []string{"IntelliJ IDEA", "com.intellij.idea.Main", "jetbrains.buildServer.agent.Launcher", "jetbrains.buildServer.agent.AgentMain", "org.jetbrains.jps.cmdline.BuildMain", "org.jetbrains.idea.maven.server.RemoteMavenServer", "org.jetbrains.jps.cmdline.Launcher", "org.jetbrains.plugins.scala.nailgun.NailgunRunner", "sun.tools.", "com.steadybit.javaagent.ExternalJavaagentAttachment", "steadybit.agent.disable-jvm-attachment", "-XX:+DisableAttachMechanism", "-Dcom.ibm.tools.attach.enable=no", "com.steadybit.agent.application.SteadybitAgentApplication", "com.steadybit.agent.application.SteadybitOutpostApplication"} )
View Source
var ( SpringPlugin = common.GetJarPath("discovery-springboot-javaagent.jar") SpringMarkerClass = "org.springframework.context.ApplicationContext" SpringBootMarkerClass = "org.springframework.boot.ApplicationRunner" SpringJdbcTemplateBeanClass = "org.springframework.jdbc.core.JdbcTemplate" SpringResttemplateBeanClass = "org.springframework.web.client.RestTemplate" SpringResttemplateBuilderBeanClass = "org.springframework.boot.web.client.RestTemplateBuilder" SpringWebclientBeanClass = "org.springframework.web.reactive.function.client.WebClient" SpringWebclientBuilderBeanClass = "org.springframework.web.reactive.function.client.WebClient$Builder" SpringApplications = sync.Map{} // map[Pid int32]SpringApplication )
Functions ¶
func AddAttachedListener ¶
func AddAttachedListener(attachedListener AttachedListener)
func AddAutoloadAgentPlugin ¶
func AddJVMListener ¶
func AddJVMListener()
func AddListener ¶
func AddListener(listener Listener)
func DeactivateDataSourceDiscovery ¶
func DeactivateDataSourceDiscovery()
func DeactivateSpringDiscovery ¶
func DeactivateSpringDiscovery()
func GetDiscoveryList ¶
func GetDiscoveryList() discovery_kit_api.DiscoveryList
func InitDataSourceDiscovery ¶
func InitDataSourceDiscovery()
func InitDiscovery ¶
func InitDiscovery()
func InitSpringDiscovery ¶
func InitSpringDiscovery()
func InstallSignalHandler ¶
func InstallSignalHandler()
func LoadAgentPlugin ¶
func NewControllerDelay ¶
func NewControllerDelay() action_kit_sdk.Action[ControllerDelayState]
func NewControllerException ¶
func NewControllerException() action_kit_sdk.Action[ControllerExceptionState]
func NewHttpClientDelay ¶
func NewHttpClientDelay() action_kit_sdk.Action[HttpClientDelayState]
func NewHttpClientStatus ¶
func NewHttpClientStatus() action_kit_sdk.Action[HttpClientStatusState]
func NewJavaMethodDelay ¶
func NewJavaMethodDelay() action_kit_sdk.Action[JavaMethodDelayState]
func NewJavaMethodException ¶
func NewJavaMethodException() action_kit_sdk.Action[JavaMethodExceptionState]
func NewJdbcTemplateDelay ¶
func NewJdbcTemplateDelay() action_kit_sdk.Action[JdbcTemplateDelayState]
func NewJdbcTemplateException ¶
func NewJdbcTemplateException() action_kit_sdk.Action[JdbcTemplateExceptionState]
func RegisterAdviceHandlers ¶ added in v1.0.11
func RegisterAdviceHandlers()
func RegisterDiscoveryHandlers ¶
func RegisterDiscoveryHandlers()
func RemoveListener ¶
func RemoveListener(listener Listener)
func SendCommandToAgent ¶
func StartAttachment ¶
func StartAttachment()
Types ¶
type AttachJvmWork ¶
type AttachJvmWork struct {
// contains filtered or unexported fields
}
type AttachedListener ¶
type AttackState ¶
type AutoloadPlugin ¶
type ControllerDelayState ¶
type ControllerDelayState struct { Delay time.Duration DelayJitter bool *ControllerState }
type ControllerExceptionState ¶
type ControllerExceptionState struct { ErroneousCallRate int *ControllerState }
type ControllerState ¶
type ControllerState struct { Pattern string Method string HandlerMethods []string *AttackState }
type DataSourceApplication ¶
type DataSourceApplication struct { Pid int32 DataSourceConnections []DataSourceConnection }
func GetDataSourceApplications ¶
func GetDataSourceApplications() []DataSourceApplication
type DataSourceConnection ¶
type DataSourceDiscovery ¶
type DataSourceDiscovery struct{}
func (DataSourceDiscovery) AttachedProcessStopped ¶
func (s DataSourceDiscovery) AttachedProcessStopped(jvm *jvm.JavaVm)
func (DataSourceDiscovery) JvmAttachedSuccessfully ¶
func (s DataSourceDiscovery) JvmAttachedSuccessfully(jvm *jvm.JavaVm)
type DataSourceDiscoverySchedulerHolder ¶ added in v1.0.7
type DataSourceDiscoverySchedulerHolder struct {
// contains filtered or unexported fields
}
type HttpClientDelayState ¶
type HttpClientDelayState struct { Delay time.Duration DelayJitter bool HostAddress string *AttackState }
type HttpClientStatusState ¶
type HttpRequest ¶
type JavaExtensionFacade ¶
type JavaExtensionFacade struct{}
func (JavaExtensionFacade) AddedJvm ¶
func (j JavaExtensionFacade) AddedJvm(jvm *jvm.JavaVm)
func (JavaExtensionFacade) RemovedJvm ¶
func (j JavaExtensionFacade) RemovedJvm(jvm *jvm.JavaVm)
type JavaMethodDelayState ¶
type JavaMethodExceptionState ¶
type JavaMethodExceptionState struct { ClassName string MethodName string ErroneousCallRate int *AttackState }
type JdbcTemplateDelayState ¶
type JdbcTemplateExceptionState ¶
type JdbcTemplateExceptionState struct { ErroneousCallRate int Operations string JdbcUrl string *AttackState }
type LoadPluginJvmWork ¶
type LoadPluginJvmWork struct {
// contains filtered or unexported fields
}
type SpringApplication ¶
type SpringApplication struct { Name string Pid int32 SpringBoot bool UsingJdbcTemplate bool UsingHttpClient bool MvcMappings *[]SpringMvcMapping HttpClientRequests *[]HttpRequest }
func FindSpringApplication ¶
func FindSpringApplication(pid int32) *SpringApplication
func GetSpringApplications ¶
func GetSpringApplications() []SpringApplication
type SpringDiscovery ¶
type SpringDiscovery struct{}
func (SpringDiscovery) AttachedProcessStopped ¶
func (s SpringDiscovery) AttachedProcessStopped(jvm *jvm.JavaVm)
func (SpringDiscovery) JvmAttachedSuccessfully ¶
func (s SpringDiscovery) JvmAttachedSuccessfully(jvm *jvm.JavaVm)
type SpringMvcMapping ¶
type SpringMvcMapping struct { Consumes []string `json:"consumes"` Headers []string `json:"headers"` Methods []string `json:"methods"` Params []string `json:"params"` Produces []string `json:"produces"` Patterns []string `json:"patterns"` HandlerClass string `json:"handlerClass"` HandlerName string `json:"handlerName"` HandlerDescriptor string `json:"handlerDescriptor"` }
type SpringVMDiscoverySchedulerHolder ¶ added in v1.0.7
type SpringVMDiscoverySchedulerHolder struct {
// contains filtered or unexported fields
}
Source Files ¶
- action_commons.go
- action_controller_commons.go
- action_controller_delay.go
- action_controller_exception.go
- action_http_client_delay.go
- action_http_client_status.go
- action_java_method_delay.go
- action_java_method_exception.go
- action_jdbc_template_delay.go
- action_jdbc_template_exception.go
- advice.go
- common.go
- datasource_discovery.go
- discovery.go
- java_attack.go
- java_extension_facade.go
- java_vms_holder.go
- spring_discovery.go
Click to show internal directories.
Click to hide internal directories.