proxy

package
v0.0.0-...-303e327 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrIllegalTopic illegal topic
	ErrIllegalTopic = errors.New("illegal topic")
)

Functions

func NewHandler

func NewHandler(service *Service) *rpc.Router

Types

type Config

type Config struct {
	cmd.Config

	alloc.BlobConfig
	alloc.VolConfig
	cacher.ConfigCache

	HeartbeatIntervalS uint32            `json:"heartbeat_interval_s"` // proxy heartbeat interval to ClusterManager
	HeartbeatTicks     uint32            `json:"heartbeat_ticks"`
	ExpiresTicks       uint32            `json:"expires_ticks"`
	Clustermgr         clustermgr.Config `json:"clustermgr"`
	MQ                 MQConfig          `json:"mq"`
}

type MQConfig

type MQConfig struct {
	BlobDeleteTopic          string            `json:"blob_delete_topic"`
	ShardRepairTopic         string            `json:"shard_repair_topic"`
	ShardRepairPriorityTopic string            `json:"shard_repair_priority_topic"`
	MsgSender                kafka.ProducerCfg `json:"msg_sender"`
}

MQConfig is mq config

type Service

type Service struct {
	Config
	// contains filtered or unexported fields
}

func New

func New(cfg Config, cmcli clustermgr.APIProxy) *Service

func (*Service) Alloc

func (s *Service) Alloc(c *rpc.Context)

Alloc vids and bids from allocator

func (*Service) EraseCache

func (s *Service) EraseCache(c *rpc.Context)

EraseCache remove cache in cacher.

func (*Service) GetCacheDisk

func (s *Service) GetCacheDisk(c *rpc.Context)

GetCacheDisk returns disk info in cacher.

func (*Service) GetCacheVolume

func (s *Service) GetCacheVolume(c *rpc.Context)

GetCacheVolume returns volume in cacher.

func (*Service) List

func (s *Service) List(c *rpc.Context)

List the volumes in this allocator

func (*Service) SendDeleteMessage

func (s *Service) SendDeleteMessage(c *rpc.Context)

SendDeleteMessage send delete message to kafka 1. message from access because of put object fail 2. message from access because of business side delete

func (*Service) SendRepairMessage

func (s *Service) SendRepairMessage(c *rpc.Context)

SendRepairMessage send repair message to kafka 1. message from access 2. message from scheduler

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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