Documentation ¶
Index ¶
- Constants
- func FollowMetadata(filerAddress ServerAddress, grpcDialOption grpc.DialOption, clientName string, ...) error
- func GrpcAddressToServerAddress(grpcAddress string) (serverAddress string)
- func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func NewGrpcServer(opts ...grpc.ServerOption) *grpc.Server
- func ParseServerAddress(server string, deltaPort int) (newServerAddress string, err error)
- func ServerToGrpcAddress(server string) (serverGrpcAddress string)
- func ToAddressStrings(addresses []ServerAddress) []string
- func ToAddressStringsFromMap(addresses map[string]ServerAddress) []string
- func WithBrokerClient(streamingMode bool, broker ServerAddress, grpcDialOption grpc.DialOption, ...) error
- func WithBrokerGrpcClient(streamingMode bool, brokerGrpcAddress string, grpcDialOption grpc.DialOption, ...) error
- func WithFilerClient(streamingMode bool, filer ServerAddress, grpcDialOption grpc.DialOption, ...) error
- func WithFilerClientFollowMetadata(filerClient filer_pb.FilerClient, clientName string, clientId int32, ...) error
- func WithGrpcClient(streamingMode bool, fn func(*grpc.ClientConn) error, address string, ...) error
- func WithGrpcFilerClient(streamingMode bool, filerGrpcAddress ServerAddress, ...) error
- func WithMasterClient(streamingMode bool, master ServerAddress, grpcDialOption grpc.DialOption, ...) error
- func WithOneOfGrpcFilerClients(streamingMode bool, filerAddresses []ServerAddress, ...) (err error)
- func WithOneOfGrpcMasterClients(streamingMode bool, masterGrpcAddresses map[string]ServerAddress, ...) (err error)
- func WithVolumeServerClient(streamingMode bool, volumeServer ServerAddress, grpcDialOption grpc.DialOption, ...) error
- type EventErrorType
- type ProcessMetadataFunc
- type ServerAddress
- func FromAddressStrings(strings []string) []ServerAddress
- func NewServerAddress(host string, port int, grpcPort int) ServerAddress
- func NewServerAddressFromDataNode(dn *master_pb.DataNodeInfo) ServerAddress
- func NewServerAddressFromLocation(dn *master_pb.Location) ServerAddress
- func NewServerAddressWithGrpcPort(address string, grpcPort int) ServerAddress
- func ParseUrl(input string) (address ServerAddress, path string, err error)
- type ServerAddresses
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 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 ServerToGrpcAddress ¶
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 (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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.