Documentation ¶
Index ¶
- Constants
- Variables
- type InOptions
- type InputHost
- func (h *InputHost) DestinationsUpdated(ctx thrift.Context, request *admin.DestinationsUpdatedRequest) (err error)
- func (h *InputHost) GetConnMsgsLimitPerSecond() int
- func (h *InputHost) GetExtMsgsLimitPerSecond() int
- func (h *InputHost) GetHostConnLimitOverall() int
- func (h *InputHost) GetHostConnLimitPerSecond() int
- func (h *InputHost) GetMaxConnPerDest() int
- func (h *InputHost) GetNumConnections() int
- func (h *InputHost) GetTokenBucketValue() common.TokenBucket
- func (h *InputHost) GetUseWebsocket() int
- func (h *InputHost) LoadUconfig()
- func (h *InputHost) OpenPublisherStream(ctx thrift.Context, call stream.BInOpenPublisherStreamInCall) error
- func (h *InputHost) OpenPublisherStreamHandler(w http.ResponseWriter, r *http.Request)
- func (h *InputHost) PutMessageBatch(ctx thrift.Context, request *cherami.PutMessageBatchRequest) (*cherami.PutMessageBatchResult_, error)
- func (h *InputHost) RegisterWSHandler() *http.ServeMux
- func (h *InputHost) Report(reporter common.LoadReporter)
- func (h *InputHost) SetConnMsgsLimitPerSecond(connLimit int32)
- func (h *InputHost) SetExtMsgsLimitPerSecond(connLimit int32)
- func (h *InputHost) SetHostConnLimit(connLimit int32)
- func (h *InputHost) SetHostConnLimitPerSecond(connLimit int32)
- func (h *InputHost) SetMaxConnPerDest(connLimit int32)
- func (h *InputHost) SetTokenBucketValue(connLimit int32)
- func (h *InputHost) SetUseWebsocket(useWebsocket int32)
- func (h *InputHost) Shutdown()
- func (h *InputHost) Start(thriftService []thrift.TChanServer)
- func (h *InputHost) Stop()
- type PathNotExistsError
- type ReplicaNotExistsError
Constants ¶
const ( // UkeyHostOverall is uconfig key for HostOverallConnLimit UkeyHostOverall = "inputhost.HostOverallConnLimit" // UkeyHostPerSec is uconfig key for HostPerSecondConnLimit UkeyHostPerSec = "inputhost.HostPerSecondConnLimit" // UkeyMaxConnPerDest is uconfig key for HostMaxConnPerDestination UkeyMaxConnPerDest = "inputhost.HostMaxConnPerDestination" // UkeyExtMsgs is the uconfig key for HostPerExtentMsgsLimitPerSecond UkeyExtMsgs = "inputhost.HostPerExtentMsgsLimitPerSecond" // UkeyConnMsgs is the uconfig key for HostPerConnMsgsLimitPerSecond UkeyConnMsgs = "inputhost.HostPerConnMsgsLimitPerSecond" // UkeyUseWebsocket is the uconfig key for UseWebsocket UkeyUseWebsocket = "inputhost.UseWebsocket" )
Variables ¶
var ErrHostShutdown = &cherami.InternalServiceError{Message: "InputHost already shutdown"}
ErrHostShutdown is returned when the host is already shutdown
var ErrThrottled = &cherami.InternalServiceError{Message: "InputHost throttling publisher cconnection"}
ErrThrottled is returned when the host is already shutdown
var ErrTimeout = &cherami.InternalServiceError{Message: "sending message to replica timed out"}
ErrTimeout is returned when the host is already shutdown
Functions ¶
This section is empty.
Types ¶
type InputHost ¶
InputHost is the main server class for InputHosts
func NewInputHost ¶
func NewInputHost(serviceName string, sVice common.SCommon, mClient metadata.TChanMetadataService, opts *InOptions) (*InputHost, []thrift.TChanServer)
NewInputHost is the constructor for BIn
func (*InputHost) DestinationsUpdated ¶
func (h *InputHost) DestinationsUpdated(ctx thrift.Context, request *admin.DestinationsUpdatedRequest) (err error)
DestinationsUpdated is the API exposed to Extent Controller to communicate any changes to existing view of extents
func (*InputHost) GetConnMsgsLimitPerSecond ¶
GetConnMsgsLimitPerSecond gets the rate limit for per connection per second
func (*InputHost) GetExtMsgsLimitPerSecond ¶
GetExtMsgsLimitPerSecond gets the rate limit for per extent per second
func (*InputHost) GetHostConnLimitOverall ¶
GetHostConnLimitOverall gets the host connection limit for inputhost
func (*InputHost) GetHostConnLimitPerSecond ¶
GetHostConnLimitPerSecond gets the host connection limit for inputhost
func (*InputHost) GetMaxConnPerDest ¶
GetMaxConnPerDest gets the max connection limit per destination
func (*InputHost) GetNumConnections ¶
GetNumConnections is the number of connections on this host
func (*InputHost) GetTokenBucketValue ¶
func (h *InputHost) GetTokenBucketValue() common.TokenBucket
GetTokenBucketValue gets token bucket for hostConnLimitPerSecond
func (*InputHost) GetUseWebsocket ¶
GetUseWebsocket gets the flag of whether to use websocket to connect to store
func (*InputHost) LoadUconfig ¶
func (h *InputHost) LoadUconfig()
LoadUconfig load the dynamic config values for key
func (*InputHost) OpenPublisherStream ¶
func (h *InputHost) OpenPublisherStream(ctx thrift.Context, call stream.BInOpenPublisherStreamInCall) error
OpenPublisherStream is the implementation of the thrift handler for the In service
func (*InputHost) OpenPublisherStreamHandler ¶
func (h *InputHost) OpenPublisherStreamHandler(w http.ResponseWriter, r *http.Request)
OpenPublisherStreamHandler is websocket handler for opening publisher stream
func (*InputHost) PutMessageBatch ¶
func (h *InputHost) PutMessageBatch(ctx thrift.Context, request *cherami.PutMessageBatchRequest) (*cherami.PutMessageBatchResult_, error)
PutMessageBatch is a thrift handler. It publishes a batch of messages to the extents of this input host for the destination.
func (*InputHost) RegisterWSHandler ¶
RegisterWSHandler is the implementation of WSService interface
func (*InputHost) Report ¶
func (h *InputHost) Report(reporter common.LoadReporter)
Report is the implementation for reporting host specific load to controller
func (*InputHost) SetConnMsgsLimitPerSecond ¶
SetConnMsgsLimitPerSecond sets the rate limit for per connection per second
func (*InputHost) SetExtMsgsLimitPerSecond ¶
SetExtMsgsLimitPerSecond sets the rate limit for per extent per second
func (*InputHost) SetHostConnLimit ¶
SetHostConnLimit sets the conn limit for this host
func (*InputHost) SetHostConnLimitPerSecond ¶
SetHostConnLimitPerSecond sets the rate at which this host can accept conns
func (*InputHost) SetMaxConnPerDest ¶
SetMaxConnPerDest sets the max connection limit per destination
func (*InputHost) SetTokenBucketValue ¶
SetTokenBucketValue sets token bucket for hostConnLimitPerSecond
func (*InputHost) SetUseWebsocket ¶
SetUseWebsocket gets the flag of whether to use websocket to connect to store
func (*InputHost) Shutdown ¶
func (h *InputHost) Shutdown()
Shutdown shutsdown all the InputHost cleanly
func (*InputHost) Start ¶
func (h *InputHost) Start(thriftService []thrift.TChanServer)
Start starts the inputhost service
type PathNotExistsError ¶
type PathNotExistsError struct{}
PathNotExistsError will be returned when no path is found to publish the message
func (*PathNotExistsError) Error ¶
func (pe *PathNotExistsError) Error() string
Error implementation of PathNotExists
type ReplicaNotExistsError ¶
type ReplicaNotExistsError struct{}
ReplicaNotExistsError will be returned when there are no replicas to publish the message
func (*ReplicaNotExistsError) Error ¶
func (re *ReplicaNotExistsError) Error() string
Error implementation of ReplicaNotExists