frontendhost

package
v1.28.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: MIT Imports: 25 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HeaderKey = ContextKey("header")

HeaderKey is the context key name for header

View Source
var ResourceUrnKey = ContextKey("resourceUrn")

ResourceUrnKey is the context key name for resourceUrn

Functions

This section is empty.

Types

type ContextKey added in v1.26.0

type ContextKey string

ContextKey is the type for context key

type Frontend

type Frontend struct {
	common.SCommon
	AppConfig configure.CommonAppConfig
	// contains filtered or unexported fields
}

Frontend is the main server class for Frontends

func NewFrontendHost

func NewFrontendHost(serviceName string, sVice common.SCommon, metadataClient m.TChanMetadataService, config configure.CommonAppConfig) (*Frontend, []thrift.TChanServer)

NewFrontendHost is the constructor for Frontend

func (*Frontend) CreateConsumerGroup

func (h *Frontend) CreateConsumerGroup(ctx thrift.Context, createRequest *c.CreateConsumerGroupRequest) (cgDesc *c.ConsumerGroupDescription, err error)

CreateConsumerGroup defines a new consumer group in the metadata

func (*Frontend) CreateDestination

func (h *Frontend) CreateDestination(ctx thrift.Context, createRequest *c.CreateDestinationRequest) (destDesc *c.DestinationDescription, err error)

CreateDestination implements TChanBFrontendServer::CreateDestination

func (*Frontend) DeleteConsumerGroup

func (h *Frontend) DeleteConsumerGroup(ctx thrift.Context, deleteRequest *c.DeleteConsumerGroupRequest) (err error)

DeleteConsumerGroup deletes a consumer group

func (*Frontend) DeleteDestination

func (h *Frontend) DeleteDestination(ctx thrift.Context, deleteRequest *c.DeleteDestinationRequest) (err error)

DeleteDestination implements TChanBFrontendServer::DeleteDestination

func (*Frontend) GetQueueDepthInfo

func (h *Frontend) GetQueueDepthInfo(ctx thrift.Context, queueRequest *c.GetQueueDepthInfoRequest) (result *c.GetQueueDepthInfoResult_, err error)

GetQueueDepthInfo return queue depth info based on the key provided

func (*Frontend) HostPort

func (h *Frontend) HostPort(ctx thrift.Context) (string, error)

HostPort implements thrift function "HostPort" to return the IP address of current instance

func (*Frontend) ListConsumerGroups

func (h *Frontend) ListConsumerGroups(ctx thrift.Context, listRequest *c.ListConsumerGroupRequest) (result *c.ListConsumerGroupResult_, err error)

ListConsumerGroups list all the consumer groups

func (*Frontend) ListDestinations

func (h *Frontend) ListDestinations(ctx thrift.Context, listRequest *c.ListDestinationsRequest) (result *c.ListDestinationsResult_, err error)

ListDestinations returns a list of destinations that begin with a given prefix, start with offset and maximum number per limit

func (*Frontend) LoadUconfig

func (h *Frontend) LoadUconfig()

LoadUconfig load the dynamic config values for key

func (*Frontend) MergeDLQForConsumerGroup

func (h *Frontend) MergeDLQForConsumerGroup(ctx thrift.Context, mergeRequest *c.MergeDLQForConsumerGroupRequest) (err error)

MergeDLQForConsumerGroup merges a DLQ for a consumer group

func (*Frontend) PurgeDLQForConsumerGroup

func (h *Frontend) PurgeDLQForConsumerGroup(ctx thrift.Context, purgeRequest *c.PurgeDLQForConsumerGroupRequest) (err error)

PurgeDLQForConsumerGroup purges a DLQ for a consumer group

func (*Frontend) ReadConsumerGroup

func (h *Frontend) ReadConsumerGroup(ctx thrift.Context, readRequest *c.ReadConsumerGroupRequest) (cGDesc *c.ConsumerGroupDescription, err error)

ReadConsumerGroup retrieves a consumer group description from the metadata service

func (*Frontend) ReadConsumerGroupHosts

func (h *Frontend) ReadConsumerGroupHosts(ctx thrift.Context, readRequest *c.ReadConsumerGroupHostsRequest) (rCGHResult *c.ReadConsumerGroupHostsResult_, err error)

ReadConsumerGroupHosts reads some outputhosts for a destination + consumer group

func (*Frontend) ReadDestination

func (h *Frontend) ReadDestination(ctx thrift.Context, readRequest *c.ReadDestinationRequest) (destDesc *c.DestinationDescription, err error)

ReadDestination implements TChanBFrontendServer::ReadDestination

func (*Frontend) ReadDestinationHosts

func (h *Frontend) ReadDestinationHosts(ctx thrift.Context, r *c.ReadDestinationHostsRequest) (result *c.ReadDestinationHostsResult_, err error)

ReadDestinationHosts implements TChanBFrontendServer::ReadDestinationHosts This will be replaced by the ReadPublisherOptions evantually

func (*Frontend) ReadPublisherOptions

func (h *Frontend) ReadPublisherOptions(ctx thrift.Context, r *c.ReadPublisherOptionsRequest) (result *c.ReadPublisherOptionsResult_, err error)

ReadPublisherOptions implements TChanBFrontendServer::ReadPublisherOptions This will replace the ReadDestinationHosts evantually

func (*Frontend) Shutdown

func (h *Frontend) Shutdown()

Shutdown shuts-down the Frontend cleanly

func (*Frontend) Start

func (h *Frontend) Start(thriftService []thrift.TChanServer)

Start starts the frontend service and advertises in hyperbahn

func (*Frontend) Stop

func (h *Frontend) Stop()

Stop stops the service

func (*Frontend) UpdateConsumerGroup

func (h *Frontend) UpdateConsumerGroup(ctx thrift.Context, updateRequest *c.UpdateConsumerGroupRequest) (cgDesc *c.ConsumerGroupDescription, err error)

UpdateConsumerGroup updates a consumer group

func (*Frontend) UpdateDestination

func (h *Frontend) UpdateDestination(ctx thrift.Context, updateRequest *c.UpdateDestinationRequest) (destDesc *c.DestinationDescription, err error)

UpdateDestination implements TChanBFrontendServer::UpdateDestination

Jump to

Keyboard shortcuts

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