Documentation ¶
Index ¶
- Constants
- Variables
- type InOptions
- type InputHost
- func (h *InputHost) DestinationsUpdated(ctx thrift.Context, request *admin.DestinationsUpdatedRequest) (err error)
- func (h *InputHost) DrainExtent(ctx thrift.Context, request *admin.DrainExtentsRequest) (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) GetNodeStatus() controller.NodeStatus
- func (h *InputHost) GetNumConnections() int
- func (h *InputHost) GetTestShortExtentsByPath() (override string)
- func (h *InputHost) GetTokenBucketValue() common.TokenBucket
- func (h *InputHost) ListLoadedDestinations(ctx thrift.Context) (result *admin.ListLoadedDestinationsResult_, err error)
- 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) ReadDestState(ctx thrift.Context, request *admin.ReadDestinationStateRequest) (result *admin.ReadDestinationStateResult_, err 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) SetNodeStatus(status controller.NodeStatus)
- func (h *InputHost) SetTestShortExtentsByPath(override string)
- func (h *InputHost) SetTokenBucketValue(connLimit int32)
- func (h *InputHost) Shutdown()
- func (h *InputHost) Start(thriftService []thrift.TChanServer)
- func (h *InputHost) Stop()
- func (h *InputHost) UnloadDestinations(ctx thrift.Context, request *admin.UnloadDestinationsRequest) (err error)
- func (h *InputHost) UpgradeHandler(w http.ResponseWriter, r *http.Request)
- 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" // UkeyTestShortExts is the uconfig key for TestShortExtentsByPath UkeyTestShortExts = "inputhost.TestShortExtentsByPath" )
Variables ¶
var ErrDrainTimedout = &cherami.InternalServiceError{Message: "Draining of Extents timedout"}
ErrDrainTimedout is returned when the draining of extents times out
var ErrDstNotLoaded = &cherami.InternalServiceError{Message: "Destination no longer served by this input host"}
ErrDstNotLoaded is returned when this input host doesn't own any extents for the destination
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 is returned when the host is already shutdown ErrTimeout = &cherami.InternalServiceError{Message: "sending message to replica timed out"} )
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) DrainExtent ¶ added in v1.26.0
DrainExtent is the implementation of the thrift handler for the inputhost
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) GetNodeStatus ¶ added in v1.26.0
func (h *InputHost) GetNodeStatus() controller.NodeStatus
GetNodeStatus is the current status of this host
func (*InputHost) GetNumConnections ¶
GetNumConnections is the number of connections on this host
func (*InputHost) GetTestShortExtentsByPath ¶ added in v1.26.0
GetTestShortExtentsByPath gets path override that enables testing short extents
func (*InputHost) GetTokenBucketValue ¶
func (h *InputHost) GetTokenBucketValue() common.TokenBucket
GetTokenBucketValue gets token bucket for hostConnLimitPerSecond
func (*InputHost) ListLoadedDestinations ¶ added in v1.26.0
func (h *InputHost) ListLoadedDestinations(ctx thrift.Context) (result *admin.ListLoadedDestinationsResult_, err error)
ListLoadedDestinations is the API used to list all the loaded destinations in memory
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) ReadDestState ¶ added in v1.26.0
func (h *InputHost) ReadDestState(ctx thrift.Context, request *admin.ReadDestinationStateRequest) (result *admin.ReadDestinationStateResult_, err error)
ReadDestState is the API used to read the state of the destination which is loaded on this inputhost
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) SetNodeStatus ¶ added in v1.26.0
func (h *InputHost) SetNodeStatus(status controller.NodeStatus)
SetNodeStatus sets the status of this host
func (*InputHost) SetTestShortExtentsByPath ¶ added in v1.26.0
SetTestShortExtentsByPath sets path override that enables testing short extents
func (*InputHost) SetTokenBucketValue ¶
SetTokenBucketValue sets token bucket for hostConnLimitPerSecond
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
func (*InputHost) UnloadDestinations ¶ added in v1.26.0
func (h *InputHost) UnloadDestinations(ctx thrift.Context, request *admin.UnloadDestinationsRequest) (err error)
UnloadDestinations is the API used to unload destination to clear the cache
func (*InputHost) UpgradeHandler ¶ added in v1.26.0
func (h *InputHost) UpgradeHandler(w http.ResponseWriter, r *http.Request)
UpgradeHandler implements the upgrade end point
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