inputhost

package
v1.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2017 License: MIT Imports: 27 Imported by: 12

Documentation

Index

Constants

View Source
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

View Source
var ErrDrainTimedout = &cherami.InternalServiceError{Message: "Draining of Extents timedout"}

ErrDrainTimedout is returned when the draining of extents times out

View Source
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

View Source
var ErrHostShutdown = &cherami.InternalServiceError{Message: "InputHost already shutdown"}

ErrHostShutdown is returned when the host is already shutdown

View Source
var ErrThrottled = &cherami.InternalServiceError{Message: "InputHost throttling publisher cconnection"}

ErrThrottled is returned when the host is already shutdown

View Source
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 InOptions

type InOptions struct {
	//CacheIdleTimeout
	CacheIdleTimeout time.Duration
}

InOptions is the options used during instantiating a new host

type InputHost

type InputHost struct {
	common.SCommon
	// contains filtered or unexported fields
}

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

func (h *InputHost) DrainExtent(ctx thrift.Context, request *admin.DrainExtentsRequest) (err error)

DrainExtent is the implementation of the thrift handler for the inputhost

func (*InputHost) GetConnMsgsLimitPerSecond

func (h *InputHost) GetConnMsgsLimitPerSecond() int

GetConnMsgsLimitPerSecond gets the rate limit for per connection per second

func (*InputHost) GetExtMsgsLimitPerSecond

func (h *InputHost) GetExtMsgsLimitPerSecond() int

GetExtMsgsLimitPerSecond gets the rate limit for per extent per second

func (*InputHost) GetHostConnLimitOverall

func (h *InputHost) GetHostConnLimitOverall() int

GetHostConnLimitOverall gets the host connection limit for inputhost

func (*InputHost) GetHostConnLimitPerSecond

func (h *InputHost) GetHostConnLimitPerSecond() int

GetHostConnLimitPerSecond gets the host connection limit for inputhost

func (*InputHost) GetMaxConnPerDest

func (h *InputHost) GetMaxConnPerDest() int

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

func (h *InputHost) GetNumConnections() int

GetNumConnections is the number of connections on this host

func (*InputHost) GetTestShortExtentsByPath added in v1.26.0

func (h *InputHost) GetTestShortExtentsByPath() (override string)

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

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

func (h *InputHost) RegisterWSHandler() *http.ServeMux

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

func (h *InputHost) SetConnMsgsLimitPerSecond(connLimit int32)

SetConnMsgsLimitPerSecond sets the rate limit for per connection per second

func (*InputHost) SetExtMsgsLimitPerSecond

func (h *InputHost) SetExtMsgsLimitPerSecond(connLimit int32)

SetExtMsgsLimitPerSecond sets the rate limit for per extent per second

func (*InputHost) SetHostConnLimit

func (h *InputHost) SetHostConnLimit(connLimit int32)

SetHostConnLimit sets the conn limit for this host

func (*InputHost) SetHostConnLimitPerSecond

func (h *InputHost) SetHostConnLimitPerSecond(connLimit int32)

SetHostConnLimitPerSecond sets the rate at which this host can accept conns

func (*InputHost) SetMaxConnPerDest

func (h *InputHost) SetMaxConnPerDest(connLimit int32)

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

func (h *InputHost) SetTestShortExtentsByPath(override string)

SetTestShortExtentsByPath sets path override that enables testing short extents

func (*InputHost) SetTokenBucketValue

func (h *InputHost) SetTokenBucketValue(connLimit int32)

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) Stop

func (h *InputHost) Stop()

Stop stops the 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL