Documentation ¶
Index ¶
- Constants
- type AgentServer
- type AgentServerOptions
- type CommandExecutor
- type Map
- type ReqRestrictor
- func (rr *ReqRestrictor) Acquire(weight int) error
- func (rr *ReqRestrictor) Digest(r *http.Request) string
- func (rr *ReqRestrictor) Filter(groupKey string, action func() (interface{}, error)) (interface{}, error, bool)
- func (rr *ReqRestrictor) FilterByDigest(r *http.Request, action func() (interface{}, error)) (interface{}, error, bool)
- func (rr *ReqRestrictor) HasSemaphore() bool
- func (rr *ReqRestrictor) HasSingleFlight() bool
- func (rr *ReqRestrictor) LogResult(groupKey string, state interface{}, err error, shared bool) (interface{}, error, bool)
- func (rr *ReqRestrictor) Release(weight int)
- type ReqRestrictorOptions
- type ReqSerializer
- type RequestPacket
- type SingleFlightPattern
- type StateStore
- type TextFormatter
- func (p *TextFormatter) PrintCollection(w http.ResponseWriter, label string, listData []string)
- func (p *TextFormatter) PrintJsonObject(w http.ResponseWriter, label string, hashData map[string]interface{}) error
- func (p *TextFormatter) PrintJsonString(w http.ResponseWriter, label string, textData string) error
- func (p *TextFormatter) PrintTextgraph(w http.ResponseWriter, label string, data interface{})
- type TextFormatterOptions
Constants ¶
View Source
const CTRL_BASEURL string = `/_`
View Source
const DEFAULT_PORT uint = 17779
View Source
const EXEC_BASEURL string = `/$`
View Source
const EXEC_BASEURL_DEPRECATED string = `/run`
View Source
const OPWIRE_EDITION_PREFIX string = "OPWIRE_EDITION"
View Source
const OPWIRE_EDITION_PREFIX_PLUS string = OPWIRE_EDITION_PREFIX + "="
View Source
const OPWIRE_REQUEST_PREFIX string = "OPWIRE_REQUEST"
View Source
const OPWIRE_REQUEST_PREFIX_PLUS string = OPWIRE_REQUEST_PREFIX + "="
View Source
const OPWIRE_SETTINGS_PREFIX string = "OPWIRE_SETTINGS"
View Source
const OPWIRE_SETTINGS_PREFIX_PLUS string = OPWIRE_SETTINGS_PREFIX + "="
View Source
const REQ_HEADER_EXECUTION_TIMEOUT string = "Opwire-Execution-Timeout"
View Source
const REQ_HEADER_EXPLAIN_FAILURE string = "Opwire-Explain-Failure"
View Source
const REQ_HEADER_EXPLAIN_SUCCESS string = "Opwire-Explain-Success"
View Source
const REQ_HEADER_REQUEST_ID_NAME string = "Opwire-Request-Id"
View Source
const REQ_HEADER_SUPPRESS_EXECUTION string = "Opwire-Suppress-Running"
View Source
const RES_HEADER_ERROR_MESSAGE string = "X-Error-Message"
View Source
const RES_HEADER_EXEC_DURATION string = "X-Exec-Duration"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentServer ¶
type AgentServer struct {
// contains filtered or unexported fields
}
func NewAgentServer ¶
func NewAgentServer(o AgentServerOptions) (s *AgentServer, err error)
func (*AgentServer) Shutdown ¶
func (s *AgentServer) Shutdown() error
func (*AgentServer) Start ¶
func (s *AgentServer) Start() error
type AgentServerOptions ¶ added in v1.0.7
type CommandExecutor ¶ added in v1.0.4
type CommandExecutor interface { Register(descriptor *invokers.CommandDescriptor, names ...string) error ResolveCommandDescriptor(opts *invokers.CommandInvocation) (descriptor *invokers.CommandDescriptor, resourceName *string, methodName *string, err error) GetSettings(resourceName string) []string StoreSettings(prefix string, settings map[string]interface{}, format string, resourceName string) error Run(io.Reader, *invokers.CommandInvocation, io.Writer, io.Writer) (*invokers.ExecutionState, error) }
type ReqRestrictor ¶ added in v1.0.7
type ReqRestrictor struct {
// contains filtered or unexported fields
}
func NewReqRestrictor ¶ added in v1.0.7
func NewReqRestrictor(logger *loq.Logger, opts ReqRestrictorOptions) (*ReqRestrictor, error)
func (*ReqRestrictor) Acquire ¶ added in v1.0.7
func (rr *ReqRestrictor) Acquire(weight int) error
func (*ReqRestrictor) Digest ¶ added in v1.0.7
func (rr *ReqRestrictor) Digest(r *http.Request) string
func (*ReqRestrictor) Filter ¶ added in v1.0.7
func (rr *ReqRestrictor) Filter(groupKey string, action func() (interface{}, error)) (interface{}, error, bool)
func (*ReqRestrictor) FilterByDigest ¶ added in v1.0.7
func (*ReqRestrictor) HasSemaphore ¶ added in v1.0.7
func (rr *ReqRestrictor) HasSemaphore() bool
func (*ReqRestrictor) HasSingleFlight ¶ added in v1.0.7
func (rr *ReqRestrictor) HasSingleFlight() bool
func (*ReqRestrictor) Release ¶ added in v1.0.7
func (rr *ReqRestrictor) Release(weight int)
type ReqRestrictorOptions ¶ added in v1.0.7
type ReqRestrictorOptions interface { ConcurrentLimitEnabled() bool ConcurrentLimitTotal() int SingleFlightEnabled() bool SingleFlightReqIdName() string SingleFlightByMethod() bool SingleFlightByPath() bool SingleFlightByBody() bool SingleFlightByHeaders() []string SingleFlightByQueries() []string SingleFlightByUserIP() bool }
type ReqSerializer ¶
type ReqSerializer struct{}
func NewReqSerializer ¶
func NewReqSerializer() (*ReqSerializer, error)
func (*ReqSerializer) Decode ¶
func (s *ReqSerializer) Decode(data []byte) (*RequestPacket, error)
type RequestPacket ¶
type SingleFlightPattern ¶ added in v1.0.7
type StateStore ¶
type StateStore struct {
// contains filtered or unexported fields
}
func NewStateStore ¶
func NewStateStore() (*StateStore, error)
func (*StateStore) Get ¶
func (ss *StateStore) Get(key string) interface{}
func (*StateStore) Store ¶
func (ss *StateStore) Store(key string, val interface{}) *StateStore
type TextFormatter ¶ added in v1.0.8
type TextFormatter struct {
// contains filtered or unexported fields
}
func NewTextFormatter ¶ added in v1.0.8
func NewTextFormatter(options TextFormatterOptions) *TextFormatter
func (*TextFormatter) PrintCollection ¶ added in v1.0.8
func (p *TextFormatter) PrintCollection(w http.ResponseWriter, label string, listData []string)
func (*TextFormatter) PrintJsonObject ¶ added in v1.0.8
func (p *TextFormatter) PrintJsonObject(w http.ResponseWriter, label string, hashData map[string]interface{}) error
func (*TextFormatter) PrintJsonString ¶ added in v1.0.8
func (p *TextFormatter) PrintJsonString(w http.ResponseWriter, label string, textData string) error
func (*TextFormatter) PrintTextgraph ¶ added in v1.0.8
func (p *TextFormatter) PrintTextgraph(w http.ResponseWriter, label string, data interface{})
type TextFormatterOptions ¶ added in v1.0.8
type TextFormatterOptions interface {
GetFormat() string
}
Click to show internal directories.
Click to hide internal directories.