Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { }
Context is Passenger Application Context. This is for expansion in future.
type Group ¶
type Group struct { Name string `xml:"name"` UUID string `xml:"uuid"` LifeStatus string `xml:"life_status"` GetWaitListSize int `xml:"get_wait_list_size"` Processes []Process `xml:"processes>process"` }
Group is the structure retuened by passenger-status.
type Passenger6Server ¶
type Passenger6Server struct {
// contains filtered or unexported fields
}
Passenger6Server implements the passenger.Server interface.
func (*Passenger6Server) IsEnabled ¶
func (s *Passenger6Server) IsEnabled() bool
IsEnabled implements the passenger.IsEnabled interface.
func (*Passenger6Server) Metrics ¶
func (s *Passenger6Server) Metrics() (*PoolInfo, error)
Metrics implements the passenger.Metrics interface.
type Passenger6ServerFactory ¶
type Passenger6ServerFactory struct { }
Passenger6ServerFactory implements the passenger.ServerFactory interface.
func (*Passenger6ServerFactory) FindInstance ¶
func (f *Passenger6ServerFactory) FindInstance() Server
FindInstance implements the passenger.ServerFactory interface.
search based on TMPDIR and PASSENGER_INSTANCE_REGISTRY_DIR dir.
func (*Passenger6ServerFactory) NewInstance ¶
func (f *Passenger6ServerFactory) NewInstance(homedir string) Server
NewInstance implements the passenger.ServerFactory interface.
If homedir satisfies the following conditions, instance will be returned.
- homedir has creation_finalized file.
- homedir has read_only_admin_password.txt file.
- can connect unix domain socket with /agents.s/core_api.
type PoolInfo ¶
type PoolInfo struct { XMLName xml.Name `xml:"info"` PassengerVersion string `xml:"passenger_version"` GroupCount int `xml:"group_count"` ProcessCount int `xml:"process_count"` Max int `xml:"max"` GetWaitListSize int `xml:"get_wait_list_size"` SuperGroups []SuperGroup `xml:"supergroups>supergroup"` }
PoolInfo is the structure retuened by passenger-status.
type Process ¶
type Process struct { PID string `xml:"pid"` Enabled string `xml:"enabled"` LifeStatus string `xml:"life_status"` Processed float64 `xml:"processed"` RSS int64 `xml:"rss"` PSS int64 `xml:"pss"` RealMemory int64 `xml:"real_memory"` VMSize int64 `xml:"vmsize"` }
Process is the structure retuened by passenger-status.
type Server ¶
type Server interface { // Metrics returns Passenger Application Status. Metrics() (*PoolInfo, error) // IsEnabled returns Server Instance status. // // If returns false, this instance is not valid. IsEnabled() bool }
Server is in that Passenger Application
type ServerFactory ¶
type ServerFactory interface { // NewInstance creates new Server instance. NewInstance(string) Server // FindInstance search and create new Server instance. FindInstance() Server }
ServerFactory is factory for Server instance.
func CreateFactory ¶
func CreateFactory(c Context) ServerFactory
CreateFactory returns the appropriate sever instance factory.
This is for expansion in future.
Depending on which version of Passenger you want to monitor, you can change connectivity, and metric collection.