pb

package
v0.0.0-...-5c6c1e7 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminShellClient = "adminShell"
)
View Source
const (
	Max_Message_Size = 1 << 30 // 1 GB
)

Variables

This section is empty.

Functions

func FollowMetadata

func FollowMetadata(filerAddress ServerAddress, grpcDialOption grpc.DialOption, clientName string, clientId int32, clientEpoch int32,
	pathPrefix string, additionalPathPrefixes []string, lastTsNs int64, untilTsNs int64, selfSignature int32,
	processEventFn ProcessMetadataFunc, eventErrorType EventErrorType) error

func GrpcAddressToServerAddress

func GrpcAddressToServerAddress(grpcAddress string) (serverAddress string)

func GrpcDial

func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

func NewGrpcServer

func NewGrpcServer(opts ...grpc.ServerOption) *grpc.Server

func ParseServerAddress

func ParseServerAddress(server string, deltaPort int) (newServerAddress string, err error)

func ServerToGrpcAddress

func ServerToGrpcAddress(server string) (serverGrpcAddress string)

func ToAddressStrings

func ToAddressStrings(addresses []ServerAddress) []string

func ToAddressStringsFromMap

func ToAddressStringsFromMap(addresses map[string]ServerAddress) []string

func WithBrokerClient

func WithBrokerClient(streamingMode bool, broker ServerAddress, grpcDialOption grpc.DialOption, fn func(client mq_pb.SeaweedMessagingClient) error) error

func WithBrokerGrpcClient

func WithBrokerGrpcClient(streamingMode bool, brokerGrpcAddress string, grpcDialOption grpc.DialOption, fn func(client mq_pb.SeaweedMessagingClient) error) error

func WithFilerClient

func WithFilerClient(streamingMode bool, filer ServerAddress, grpcDialOption grpc.DialOption, fn func(client filer_pb.SeaweedFilerClient) error) error

func WithFilerClientFollowMetadata

func WithFilerClientFollowMetadata(filerClient filer_pb.FilerClient,
	clientName string, clientId int32, clientEpoch int32, pathPrefix string, lastTsNs *int64, untilTsNs int64, selfSignature int32,
	processEventFn ProcessMetadataFunc, eventErrorType EventErrorType) error

func WithGrpcClient

func WithGrpcClient(streamingMode bool, fn func(*grpc.ClientConn) error, address string, opts ...grpc.DialOption) error

WithGrpcClient In streamingMode, always use a fresh connection. Otherwise, try to reuse an existing connection.

func WithGrpcFilerClient

func WithGrpcFilerClient(streamingMode bool, filerGrpcAddress ServerAddress, grpcDialOption grpc.DialOption, fn func(client filer_pb.SeaweedFilerClient) error) error

func WithMasterClient

func WithMasterClient(streamingMode bool, master ServerAddress, grpcDialOption grpc.DialOption, fn func(client master_pb.SeaweedClient) error) error

func WithOneOfGrpcFilerClients

func WithOneOfGrpcFilerClients(streamingMode bool, filerAddresses []ServerAddress, grpcDialOption grpc.DialOption, fn func(client filer_pb.SeaweedFilerClient) error) (err error)

func WithOneOfGrpcMasterClients

func WithOneOfGrpcMasterClients(streamingMode bool, masterGrpcAddresses map[string]ServerAddress, grpcDialOption grpc.DialOption, fn func(client master_pb.SeaweedClient) error) (err error)

func WithVolumeServerClient

func WithVolumeServerClient(streamingMode bool, volumeServer ServerAddress, grpcDialOption grpc.DialOption, fn func(client volume_server_pb.VolumeServerClient) error) error

Types

type EventErrorType

type EventErrorType int
const (
	TrivialOnError EventErrorType = iota
	FatalOnError
	RetryForeverOnError
)

type ProcessMetadataFunc

type ProcessMetadataFunc func(resp *filer_pb.SubscribeMetadataResponse) error

func AddOffsetFunc

func AddOffsetFunc(processEventFn ProcessMetadataFunc, offsetInterval time.Duration, offsetFunc func(counter int64, offset int64) error) ProcessMetadataFunc

type ServerAddress

type ServerAddress string

func FromAddressStrings

func FromAddressStrings(strings []string) []ServerAddress

func NewServerAddress

func NewServerAddress(host string, port int, grpcPort int) ServerAddress

func NewServerAddressFromDataNode

func NewServerAddressFromDataNode(dn *master_pb.DataNodeInfo) ServerAddress

func NewServerAddressFromLocation

func NewServerAddressFromLocation(dn *master_pb.Location) ServerAddress

func NewServerAddressWithGrpcPort

func NewServerAddressWithGrpcPort(address string, grpcPort int) ServerAddress

func ParseUrl

func ParseUrl(input string) (address ServerAddress, path string, err error)

func (ServerAddress) String

func (sa ServerAddress) String() string

func (ServerAddress) ToGrpcAddress

func (sa ServerAddress) ToGrpcAddress() string

func (ServerAddress) ToHttpAddress

func (sa ServerAddress) ToHttpAddress() string

type ServerAddresses

type ServerAddresses string

func (ServerAddresses) ToAddressMap

func (sa ServerAddresses) ToAddressMap() (addresses map[string]ServerAddress)

func (ServerAddresses) ToAddressStrings

func (sa ServerAddresses) ToAddressStrings() (addresses []string)

func (ServerAddresses) ToAddresses

func (sa ServerAddresses) ToAddresses() (addresses []ServerAddress)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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