pachyderm: github.com/pachyderm/pachyderm/src/client/pkg/shard Index | Files

package shard

import "github.com/pachyderm/pachyderm/src/client/pkg/shard"

Index

Package Files

router.go shard.go shard.pb.go sharder.go

Constants

const InvalidVersion int64 = -1

InvalidVersion is defined as -1 since valid versions are non-negative.

Variables

var (
    ErrInvalidLengthShard = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowShard   = fmt.Errorf("proto: integer overflow")
)
var (

    // ErrCancelled is returned when an action is cancelled by the user
    ErrCancelled = fmt.Errorf("cancelled by user")
)

type AddServerRole Uses

type AddServerRole struct {
    ServerRole           *ServerRole `protobuf:"bytes,1,opt,name=serverRole,proto3" json:"serverRole,omitempty"`
    Error                string      `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
    XXX_NoUnkeyedLiteral struct{}    `json:"-"`
    XXX_unrecognized     []byte      `json:"-"`
    XXX_sizecache        int32       `json:"-"`
}

func (*AddServerRole) Descriptor Uses

func (*AddServerRole) Descriptor() ([]byte, []int)

func (*AddServerRole) GetError Uses

func (m *AddServerRole) GetError() string

func (*AddServerRole) GetServerRole Uses

func (m *AddServerRole) GetServerRole() *ServerRole

func (*AddServerRole) Marshal Uses

func (m *AddServerRole) Marshal() (dAtA []byte, err error)

func (*AddServerRole) MarshalTo Uses

func (m *AddServerRole) MarshalTo(dAtA []byte) (int, error)

func (*AddServerRole) MarshalToSizedBuffer Uses

func (m *AddServerRole) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AddServerRole) ProtoMessage Uses

func (*AddServerRole) ProtoMessage()

func (*AddServerRole) Reset Uses

func (m *AddServerRole) Reset()

func (*AddServerRole) Size Uses

func (m *AddServerRole) Size() (n int)

func (*AddServerRole) String Uses

func (m *AddServerRole) String() string

func (*AddServerRole) Unmarshal Uses

func (m *AddServerRole) Unmarshal(dAtA []byte) error

func (*AddServerRole) XXX_DiscardUnknown Uses

func (m *AddServerRole) XXX_DiscardUnknown()

func (*AddServerRole) XXX_Marshal Uses

func (m *AddServerRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddServerRole) XXX_Merge Uses

func (m *AddServerRole) XXX_Merge(src proto.Message)

func (*AddServerRole) XXX_Size Uses

func (m *AddServerRole) XXX_Size() int

func (*AddServerRole) XXX_Unmarshal Uses

func (m *AddServerRole) XXX_Unmarshal(b []byte) error

type Addresses Uses

type Addresses struct {
    Version              int64             `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
    Addresses            map[uint64]string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

func (*Addresses) Descriptor Uses

func (*Addresses) Descriptor() ([]byte, []int)

func (*Addresses) GetAddresses Uses

func (m *Addresses) GetAddresses() map[uint64]string

func (*Addresses) GetVersion Uses

func (m *Addresses) GetVersion() int64

func (*Addresses) Marshal Uses

func (m *Addresses) Marshal() (dAtA []byte, err error)

func (*Addresses) MarshalTo Uses

func (m *Addresses) MarshalTo(dAtA []byte) (int, error)

func (*Addresses) MarshalToSizedBuffer Uses

func (m *Addresses) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Addresses) ProtoMessage Uses

func (*Addresses) ProtoMessage()

func (*Addresses) Reset Uses

func (m *Addresses) Reset()

func (*Addresses) Size Uses

func (m *Addresses) Size() (n int)

func (*Addresses) String Uses

func (m *Addresses) String() string

func (*Addresses) Unmarshal Uses

func (m *Addresses) Unmarshal(dAtA []byte) error

func (*Addresses) XXX_DiscardUnknown Uses

func (m *Addresses) XXX_DiscardUnknown()

func (*Addresses) XXX_Marshal Uses

func (m *Addresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Addresses) XXX_Merge Uses

func (m *Addresses) XXX_Merge(src proto.Message)

func (*Addresses) XXX_Size Uses

func (m *Addresses) XXX_Size() int

func (*Addresses) XXX_Unmarshal Uses

func (m *Addresses) XXX_Unmarshal(b []byte) error

type DeleteServerRole Uses

type DeleteServerRole struct {
    ServerRole           *ServerRole `protobuf:"bytes,2,opt,name=serverRole,proto3" json:"serverRole,omitempty"`
    XXX_NoUnkeyedLiteral struct{}    `json:"-"`
    XXX_unrecognized     []byte      `json:"-"`
    XXX_sizecache        int32       `json:"-"`
}

func (*DeleteServerRole) Descriptor Uses

func (*DeleteServerRole) Descriptor() ([]byte, []int)

func (*DeleteServerRole) GetServerRole Uses

func (m *DeleteServerRole) GetServerRole() *ServerRole

func (*DeleteServerRole) Marshal Uses

func (m *DeleteServerRole) Marshal() (dAtA []byte, err error)

func (*DeleteServerRole) MarshalTo Uses

func (m *DeleteServerRole) MarshalTo(dAtA []byte) (int, error)

func (*DeleteServerRole) MarshalToSizedBuffer Uses

func (m *DeleteServerRole) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeleteServerRole) ProtoMessage Uses

func (*DeleteServerRole) ProtoMessage()

func (*DeleteServerRole) Reset Uses

func (m *DeleteServerRole) Reset()

func (*DeleteServerRole) Size Uses

func (m *DeleteServerRole) Size() (n int)

func (*DeleteServerRole) String Uses

func (m *DeleteServerRole) String() string

func (*DeleteServerRole) Unmarshal Uses

func (m *DeleteServerRole) Unmarshal(dAtA []byte) error

func (*DeleteServerRole) XXX_DiscardUnknown Uses

func (m *DeleteServerRole) XXX_DiscardUnknown()

func (*DeleteServerRole) XXX_Marshal Uses

func (m *DeleteServerRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteServerRole) XXX_Merge Uses

func (m *DeleteServerRole) XXX_Merge(src proto.Message)

func (*DeleteServerRole) XXX_Size Uses

func (m *DeleteServerRole) XXX_Size() int

func (*DeleteServerRole) XXX_Unmarshal Uses

func (m *DeleteServerRole) XXX_Unmarshal(b []byte) error

type FailedToAssignRoles Uses

type FailedToAssignRoles struct {
    ServerStates         map[string]*ServerState `protobuf:"bytes,1,rep,name=server_states,json=serverStates,proto3" json:"server_states,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    NumShards            uint64                  `protobuf:"varint,2,opt,name=num_shards,json=numShards,proto3" json:"num_shards,omitempty"`
    NumReplicas          uint64                  `protobuf:"varint,3,opt,name=num_replicas,json=numReplicas,proto3" json:"num_replicas,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                `json:"-"`
    XXX_unrecognized     []byte                  `json:"-"`
    XXX_sizecache        int32                   `json:"-"`
}

func (*FailedToAssignRoles) Descriptor Uses

func (*FailedToAssignRoles) Descriptor() ([]byte, []int)

func (*FailedToAssignRoles) GetNumReplicas Uses

func (m *FailedToAssignRoles) GetNumReplicas() uint64

func (*FailedToAssignRoles) GetNumShards Uses

func (m *FailedToAssignRoles) GetNumShards() uint64

func (*FailedToAssignRoles) GetServerStates Uses

func (m *FailedToAssignRoles) GetServerStates() map[string]*ServerState

func (*FailedToAssignRoles) Marshal Uses

func (m *FailedToAssignRoles) Marshal() (dAtA []byte, err error)

func (*FailedToAssignRoles) MarshalTo Uses

func (m *FailedToAssignRoles) MarshalTo(dAtA []byte) (int, error)

func (*FailedToAssignRoles) MarshalToSizedBuffer Uses

func (m *FailedToAssignRoles) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FailedToAssignRoles) ProtoMessage Uses

func (*FailedToAssignRoles) ProtoMessage()

func (*FailedToAssignRoles) Reset Uses

func (m *FailedToAssignRoles) Reset()

func (*FailedToAssignRoles) Size Uses

func (m *FailedToAssignRoles) Size() (n int)

func (*FailedToAssignRoles) String Uses

func (m *FailedToAssignRoles) String() string

func (*FailedToAssignRoles) Unmarshal Uses

func (m *FailedToAssignRoles) Unmarshal(dAtA []byte) error

func (*FailedToAssignRoles) XXX_DiscardUnknown Uses

func (m *FailedToAssignRoles) XXX_DiscardUnknown()

func (*FailedToAssignRoles) XXX_Marshal Uses

func (m *FailedToAssignRoles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FailedToAssignRoles) XXX_Merge Uses

func (m *FailedToAssignRoles) XXX_Merge(src proto.Message)

func (*FailedToAssignRoles) XXX_Size Uses

func (m *FailedToAssignRoles) XXX_Size() int

func (*FailedToAssignRoles) XXX_Unmarshal Uses

func (m *FailedToAssignRoles) XXX_Unmarshal(b []byte) error

type FinishAssignRoles Uses

type FinishAssignRoles struct {
    Error                string   `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*FinishAssignRoles) Descriptor Uses

func (*FinishAssignRoles) Descriptor() ([]byte, []int)

func (*FinishAssignRoles) GetError Uses

func (m *FinishAssignRoles) GetError() string

func (*FinishAssignRoles) Marshal Uses

func (m *FinishAssignRoles) Marshal() (dAtA []byte, err error)

func (*FinishAssignRoles) MarshalTo Uses

func (m *FinishAssignRoles) MarshalTo(dAtA []byte) (int, error)

func (*FinishAssignRoles) MarshalToSizedBuffer Uses

func (m *FinishAssignRoles) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FinishAssignRoles) ProtoMessage Uses

func (*FinishAssignRoles) ProtoMessage()

func (*FinishAssignRoles) Reset Uses

func (m *FinishAssignRoles) Reset()

func (*FinishAssignRoles) Size Uses

func (m *FinishAssignRoles) Size() (n int)

func (*FinishAssignRoles) String Uses

func (m *FinishAssignRoles) String() string

func (*FinishAssignRoles) Unmarshal Uses

func (m *FinishAssignRoles) Unmarshal(dAtA []byte) error

func (*FinishAssignRoles) XXX_DiscardUnknown Uses

func (m *FinishAssignRoles) XXX_DiscardUnknown()

func (*FinishAssignRoles) XXX_Marshal Uses

func (m *FinishAssignRoles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FinishAssignRoles) XXX_Merge Uses

func (m *FinishAssignRoles) XXX_Merge(src proto.Message)

func (*FinishAssignRoles) XXX_Size Uses

func (m *FinishAssignRoles) XXX_Size() int

func (*FinishAssignRoles) XXX_Unmarshal Uses

func (m *FinishAssignRoles) XXX_Unmarshal(b []byte) error

type FinishRegister Uses

type FinishRegister struct {
    Address              string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
    Error                string   `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*FinishRegister) Descriptor Uses

func (*FinishRegister) Descriptor() ([]byte, []int)

func (*FinishRegister) GetAddress Uses

func (m *FinishRegister) GetAddress() string

func (*FinishRegister) GetError Uses

func (m *FinishRegister) GetError() string

func (*FinishRegister) Marshal Uses

func (m *FinishRegister) Marshal() (dAtA []byte, err error)

func (*FinishRegister) MarshalTo Uses

func (m *FinishRegister) MarshalTo(dAtA []byte) (int, error)

func (*FinishRegister) MarshalToSizedBuffer Uses

func (m *FinishRegister) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FinishRegister) ProtoMessage Uses

func (*FinishRegister) ProtoMessage()

func (*FinishRegister) Reset Uses

func (m *FinishRegister) Reset()

func (*FinishRegister) Size Uses

func (m *FinishRegister) Size() (n int)

func (*FinishRegister) String Uses

func (m *FinishRegister) String() string

func (*FinishRegister) Unmarshal Uses

func (m *FinishRegister) Unmarshal(dAtA []byte) error

func (*FinishRegister) XXX_DiscardUnknown Uses

func (m *FinishRegister) XXX_DiscardUnknown()

func (*FinishRegister) XXX_Marshal Uses

func (m *FinishRegister) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FinishRegister) XXX_Merge Uses

func (m *FinishRegister) XXX_Merge(src proto.Message)

func (*FinishRegister) XXX_Size Uses

func (m *FinishRegister) XXX_Size() int

func (*FinishRegister) XXX_Unmarshal Uses

func (m *FinishRegister) XXX_Unmarshal(b []byte) error

type Frontend Uses

type Frontend interface {
    // Version tells the Frontend a new version exists.
    // Version should block until the Frontend is done using the previous version.
    Version(version int64) error
}

A Frontend represents a frontend which receives new versions.

type FrontendState Uses

type FrontendState struct {
    Address              string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
    Version              int64    `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*FrontendState) Descriptor Uses

func (*FrontendState) Descriptor() ([]byte, []int)

func (*FrontendState) GetAddress Uses

func (m *FrontendState) GetAddress() string

func (*FrontendState) GetVersion Uses

func (m *FrontendState) GetVersion() int64

func (*FrontendState) Marshal Uses

func (m *FrontendState) Marshal() (dAtA []byte, err error)

func (*FrontendState) MarshalTo Uses

func (m *FrontendState) MarshalTo(dAtA []byte) (int, error)

func (*FrontendState) MarshalToSizedBuffer Uses

func (m *FrontendState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FrontendState) ProtoMessage Uses

func (*FrontendState) ProtoMessage()

func (*FrontendState) Reset Uses

func (m *FrontendState) Reset()

func (*FrontendState) Size Uses

func (m *FrontendState) Size() (n int)

func (*FrontendState) String Uses

func (m *FrontendState) String() string

func (*FrontendState) Unmarshal Uses

func (m *FrontendState) Unmarshal(dAtA []byte) error

func (*FrontendState) XXX_DiscardUnknown Uses

func (m *FrontendState) XXX_DiscardUnknown()

func (*FrontendState) XXX_Marshal Uses

func (m *FrontendState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FrontendState) XXX_Merge Uses

func (m *FrontendState) XXX_Merge(src proto.Message)

func (*FrontendState) XXX_Size Uses

func (m *FrontendState) XXX_Size() int

func (*FrontendState) XXX_Unmarshal Uses

func (m *FrontendState) XXX_Unmarshal(b []byte) error

type GetAddress Uses

type GetAddress struct {
    Shard                uint64   `protobuf:"varint,1,opt,name=shard,proto3" json:"shard,omitempty"`
    Version              int64    `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
    Result               string   `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
    Ok                   bool     `protobuf:"varint,4,opt,name=ok,proto3" json:"ok,omitempty"`
    Error                string   `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*GetAddress) Descriptor Uses

func (*GetAddress) Descriptor() ([]byte, []int)

func (*GetAddress) GetError Uses

func (m *GetAddress) GetError() string

func (*GetAddress) GetOk Uses

func (m *GetAddress) GetOk() bool

func (*GetAddress) GetResult Uses

func (m *GetAddress) GetResult() string

func (*GetAddress) GetShard Uses

func (m *GetAddress) GetShard() uint64

func (*GetAddress) GetVersion Uses

func (m *GetAddress) GetVersion() int64

func (*GetAddress) Marshal Uses

func (m *GetAddress) Marshal() (dAtA []byte, err error)

func (*GetAddress) MarshalTo Uses

func (m *GetAddress) MarshalTo(dAtA []byte) (int, error)

func (*GetAddress) MarshalToSizedBuffer Uses

func (m *GetAddress) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetAddress) ProtoMessage Uses

func (*GetAddress) ProtoMessage()

func (*GetAddress) Reset Uses

func (m *GetAddress) Reset()

func (*GetAddress) Size Uses

func (m *GetAddress) Size() (n int)

func (*GetAddress) String Uses

func (m *GetAddress) String() string

func (*GetAddress) Unmarshal Uses

func (m *GetAddress) Unmarshal(dAtA []byte) error

func (*GetAddress) XXX_DiscardUnknown Uses

func (m *GetAddress) XXX_DiscardUnknown()

func (*GetAddress) XXX_Marshal Uses

func (m *GetAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetAddress) XXX_Merge Uses

func (m *GetAddress) XXX_Merge(src proto.Message)

func (*GetAddress) XXX_Size Uses

func (m *GetAddress) XXX_Size() int

func (*GetAddress) XXX_Unmarshal Uses

func (m *GetAddress) XXX_Unmarshal(b []byte) error

type GetShardToAddress Uses

type GetShardToAddress struct {
    Version              int64             `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
    Result               map[uint64]string `protobuf:"bytes,2,rep,name=result,proto3" json:"result,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    Error                string            `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

func (*GetShardToAddress) Descriptor Uses

func (*GetShardToAddress) Descriptor() ([]byte, []int)

func (*GetShardToAddress) GetError Uses

func (m *GetShardToAddress) GetError() string

func (*GetShardToAddress) GetResult Uses

func (m *GetShardToAddress) GetResult() map[uint64]string

func (*GetShardToAddress) GetVersion Uses

func (m *GetShardToAddress) GetVersion() int64

func (*GetShardToAddress) Marshal Uses

func (m *GetShardToAddress) Marshal() (dAtA []byte, err error)

func (*GetShardToAddress) MarshalTo Uses

func (m *GetShardToAddress) MarshalTo(dAtA []byte) (int, error)

func (*GetShardToAddress) MarshalToSizedBuffer Uses

func (m *GetShardToAddress) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetShardToAddress) ProtoMessage Uses

func (*GetShardToAddress) ProtoMessage()

func (*GetShardToAddress) Reset Uses

func (m *GetShardToAddress) Reset()

func (*GetShardToAddress) Size Uses

func (m *GetShardToAddress) Size() (n int)

func (*GetShardToAddress) String Uses

func (m *GetShardToAddress) String() string

func (*GetShardToAddress) Unmarshal Uses

func (m *GetShardToAddress) Unmarshal(dAtA []byte) error

func (*GetShardToAddress) XXX_DiscardUnknown Uses

func (m *GetShardToAddress) XXX_DiscardUnknown()

func (*GetShardToAddress) XXX_Marshal Uses

func (m *GetShardToAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetShardToAddress) XXX_Merge Uses

func (m *GetShardToAddress) XXX_Merge(src proto.Message)

func (*GetShardToAddress) XXX_Size Uses

func (m *GetShardToAddress) XXX_Size() int

func (*GetShardToAddress) XXX_Unmarshal Uses

func (m *GetShardToAddress) XXX_Unmarshal(b []byte) error

type RemoveServerRole Uses

type RemoveServerRole struct {
    ServerRole           *ServerRole `protobuf:"bytes,1,opt,name=serverRole,proto3" json:"serverRole,omitempty"`
    Error                string      `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
    XXX_NoUnkeyedLiteral struct{}    `json:"-"`
    XXX_unrecognized     []byte      `json:"-"`
    XXX_sizecache        int32       `json:"-"`
}

func (*RemoveServerRole) Descriptor Uses

func (*RemoveServerRole) Descriptor() ([]byte, []int)

func (*RemoveServerRole) GetError Uses

func (m *RemoveServerRole) GetError() string

func (*RemoveServerRole) GetServerRole Uses

func (m *RemoveServerRole) GetServerRole() *ServerRole

func (*RemoveServerRole) Marshal Uses

func (m *RemoveServerRole) Marshal() (dAtA []byte, err error)

func (*RemoveServerRole) MarshalTo Uses

func (m *RemoveServerRole) MarshalTo(dAtA []byte) (int, error)

func (*RemoveServerRole) MarshalToSizedBuffer Uses

func (m *RemoveServerRole) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RemoveServerRole) ProtoMessage Uses

func (*RemoveServerRole) ProtoMessage()

func (*RemoveServerRole) Reset Uses

func (m *RemoveServerRole) Reset()

func (*RemoveServerRole) Size Uses

func (m *RemoveServerRole) Size() (n int)

func (*RemoveServerRole) String Uses

func (m *RemoveServerRole) String() string

func (*RemoveServerRole) Unmarshal Uses

func (m *RemoveServerRole) Unmarshal(dAtA []byte) error

func (*RemoveServerRole) XXX_DiscardUnknown Uses

func (m *RemoveServerRole) XXX_DiscardUnknown()

func (*RemoveServerRole) XXX_Marshal Uses

func (m *RemoveServerRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveServerRole) XXX_Merge Uses

func (m *RemoveServerRole) XXX_Merge(src proto.Message)

func (*RemoveServerRole) XXX_Size Uses

func (m *RemoveServerRole) XXX_Size() int

func (*RemoveServerRole) XXX_Unmarshal Uses

func (m *RemoveServerRole) XXX_Unmarshal(b []byte) error

type Router Uses

type Router interface {
    GetShards(version int64) (map[uint64]bool, error)
    GetClientConn(shard uint64, version int64) (*grpc.ClientConn, error)
    GetAllClientConns(version int64) ([]*grpc.ClientConn, error)
    CloseClientConns() error // close all outstanding client connections
}

Router represents a router from shard id and version to grpc connections.

func NewRouter Uses

func NewRouter(
    sharder Sharder,
    dialer grpcutil.Dialer,
    localAddress string,
) Router

NewRouter creates a Router.

type Server Uses

type Server interface {
    // AddShard tells the server it now has a role for a shard.
    AddShard(shard uint64) error
    // RemoveShard tells the server it no longer has a role for a shard.
    DeleteShard(shard uint64) error
}

A Server represents a server that has roles for shards.

type ServerRole Uses

type ServerRole struct {
    Address              string          `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
    Version              int64           `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
    Shards               map[uint64]bool `protobuf:"bytes,3,rep,name=shards,proto3" json:"shards,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
    XXX_NoUnkeyedLiteral struct{}        `json:"-"`
    XXX_unrecognized     []byte          `json:"-"`
    XXX_sizecache        int32           `json:"-"`
}

func (*ServerRole) Descriptor Uses

func (*ServerRole) Descriptor() ([]byte, []int)

func (*ServerRole) GetAddress Uses

func (m *ServerRole) GetAddress() string

func (*ServerRole) GetShards Uses

func (m *ServerRole) GetShards() map[uint64]bool

func (*ServerRole) GetVersion Uses

func (m *ServerRole) GetVersion() int64

func (*ServerRole) Marshal Uses

func (m *ServerRole) Marshal() (dAtA []byte, err error)

func (*ServerRole) MarshalTo Uses

func (m *ServerRole) MarshalTo(dAtA []byte) (int, error)

func (*ServerRole) MarshalToSizedBuffer Uses

func (m *ServerRole) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServerRole) ProtoMessage Uses

func (*ServerRole) ProtoMessage()

func (*ServerRole) Reset Uses

func (m *ServerRole) Reset()

func (*ServerRole) Size Uses

func (m *ServerRole) Size() (n int)

func (*ServerRole) String Uses

func (m *ServerRole) String() string

func (*ServerRole) Unmarshal Uses

func (m *ServerRole) Unmarshal(dAtA []byte) error

func (*ServerRole) XXX_DiscardUnknown Uses

func (m *ServerRole) XXX_DiscardUnknown()

func (*ServerRole) XXX_Marshal Uses

func (m *ServerRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerRole) XXX_Merge Uses

func (m *ServerRole) XXX_Merge(src proto.Message)

func (*ServerRole) XXX_Size Uses

func (m *ServerRole) XXX_Size() int

func (*ServerRole) XXX_Unmarshal Uses

func (m *ServerRole) XXX_Unmarshal(b []byte) error

type ServerState Uses

type ServerState struct {
    Address              string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
    Version              int64    `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*ServerState) Descriptor Uses

func (*ServerState) Descriptor() ([]byte, []int)

func (*ServerState) GetAddress Uses

func (m *ServerState) GetAddress() string

func (*ServerState) GetVersion Uses

func (m *ServerState) GetVersion() int64

func (*ServerState) Marshal Uses

func (m *ServerState) Marshal() (dAtA []byte, err error)

func (*ServerState) MarshalTo Uses

func (m *ServerState) MarshalTo(dAtA []byte) (int, error)

func (*ServerState) MarshalToSizedBuffer Uses

func (m *ServerState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServerState) ProtoMessage Uses

func (*ServerState) ProtoMessage()

func (*ServerState) Reset Uses

func (m *ServerState) Reset()

func (*ServerState) Size Uses

func (m *ServerState) Size() (n int)

func (*ServerState) String Uses

func (m *ServerState) String() string

func (*ServerState) Unmarshal Uses

func (m *ServerState) Unmarshal(dAtA []byte) error

func (*ServerState) XXX_DiscardUnknown Uses

func (m *ServerState) XXX_DiscardUnknown()

func (*ServerState) XXX_Marshal Uses

func (m *ServerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerState) XXX_Merge Uses

func (m *ServerState) XXX_Merge(src proto.Message)

func (*ServerState) XXX_Size Uses

func (m *ServerState) XXX_Size() int

func (*ServerState) XXX_Unmarshal Uses

func (m *ServerState) XXX_Unmarshal(b []byte) error

type SetAddresses Uses

type SetAddresses struct {
    Addresses            *Addresses `protobuf:"bytes,1,opt,name=addresses,proto3" json:"addresses,omitempty"`
    XXX_NoUnkeyedLiteral struct{}   `json:"-"`
    XXX_unrecognized     []byte     `json:"-"`
    XXX_sizecache        int32      `json:"-"`
}

func (*SetAddresses) Descriptor Uses

func (*SetAddresses) Descriptor() ([]byte, []int)

func (*SetAddresses) GetAddresses Uses

func (m *SetAddresses) GetAddresses() *Addresses

func (*SetAddresses) Marshal Uses

func (m *SetAddresses) Marshal() (dAtA []byte, err error)

func (*SetAddresses) MarshalTo Uses

func (m *SetAddresses) MarshalTo(dAtA []byte) (int, error)

func (*SetAddresses) MarshalToSizedBuffer Uses

func (m *SetAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SetAddresses) ProtoMessage Uses

func (*SetAddresses) ProtoMessage()

func (*SetAddresses) Reset Uses

func (m *SetAddresses) Reset()

func (*SetAddresses) Size Uses

func (m *SetAddresses) Size() (n int)

func (*SetAddresses) String Uses

func (m *SetAddresses) String() string

func (*SetAddresses) Unmarshal Uses

func (m *SetAddresses) Unmarshal(dAtA []byte) error

func (*SetAddresses) XXX_DiscardUnknown Uses

func (m *SetAddresses) XXX_DiscardUnknown()

func (*SetAddresses) XXX_Marshal Uses

func (m *SetAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetAddresses) XXX_Merge Uses

func (m *SetAddresses) XXX_Merge(src proto.Message)

func (*SetAddresses) XXX_Size Uses

func (m *SetAddresses) XXX_Size() int

func (*SetAddresses) XXX_Unmarshal Uses

func (m *SetAddresses) XXX_Unmarshal(b []byte) error

type SetFrontendState Uses

type SetFrontendState struct {
    FrontendState        *FrontendState `protobuf:"bytes,1,opt,name=frontendState,proto3" json:"frontendState,omitempty"`
    XXX_NoUnkeyedLiteral struct{}       `json:"-"`
    XXX_unrecognized     []byte         `json:"-"`
    XXX_sizecache        int32          `json:"-"`
}

func (*SetFrontendState) Descriptor Uses

func (*SetFrontendState) Descriptor() ([]byte, []int)

func (*SetFrontendState) GetFrontendState Uses

func (m *SetFrontendState) GetFrontendState() *FrontendState

func (*SetFrontendState) Marshal Uses

func (m *SetFrontendState) Marshal() (dAtA []byte, err error)

func (*SetFrontendState) MarshalTo Uses

func (m *SetFrontendState) MarshalTo(dAtA []byte) (int, error)

func (*SetFrontendState) MarshalToSizedBuffer Uses

func (m *SetFrontendState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SetFrontendState) ProtoMessage Uses

func (*SetFrontendState) ProtoMessage()

func (*SetFrontendState) Reset Uses

func (m *SetFrontendState) Reset()

func (*SetFrontendState) Size Uses

func (m *SetFrontendState) Size() (n int)

func (*SetFrontendState) String Uses

func (m *SetFrontendState) String() string

func (*SetFrontendState) Unmarshal Uses

func (m *SetFrontendState) Unmarshal(dAtA []byte) error

func (*SetFrontendState) XXX_DiscardUnknown Uses

func (m *SetFrontendState) XXX_DiscardUnknown()

func (*SetFrontendState) XXX_Marshal Uses

func (m *SetFrontendState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetFrontendState) XXX_Merge Uses

func (m *SetFrontendState) XXX_Merge(src proto.Message)

func (*SetFrontendState) XXX_Size Uses

func (m *SetFrontendState) XXX_Size() int

func (*SetFrontendState) XXX_Unmarshal Uses

func (m *SetFrontendState) XXX_Unmarshal(b []byte) error

type SetServerRole Uses

type SetServerRole struct {
    ServerRole           *ServerRole `protobuf:"bytes,2,opt,name=serverRole,proto3" json:"serverRole,omitempty"`
    XXX_NoUnkeyedLiteral struct{}    `json:"-"`
    XXX_unrecognized     []byte      `json:"-"`
    XXX_sizecache        int32       `json:"-"`
}

func (*SetServerRole) Descriptor Uses

func (*SetServerRole) Descriptor() ([]byte, []int)

func (*SetServerRole) GetServerRole Uses

func (m *SetServerRole) GetServerRole() *ServerRole

func (*SetServerRole) Marshal Uses

func (m *SetServerRole) Marshal() (dAtA []byte, err error)

func (*SetServerRole) MarshalTo Uses

func (m *SetServerRole) MarshalTo(dAtA []byte) (int, error)

func (*SetServerRole) MarshalToSizedBuffer Uses

func (m *SetServerRole) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SetServerRole) ProtoMessage Uses

func (*SetServerRole) ProtoMessage()

func (*SetServerRole) Reset Uses

func (m *SetServerRole) Reset()

func (*SetServerRole) Size Uses

func (m *SetServerRole) Size() (n int)

func (*SetServerRole) String Uses

func (m *SetServerRole) String() string

func (*SetServerRole) Unmarshal Uses

func (m *SetServerRole) Unmarshal(dAtA []byte) error

func (*SetServerRole) XXX_DiscardUnknown Uses

func (m *SetServerRole) XXX_DiscardUnknown()

func (*SetServerRole) XXX_Marshal Uses

func (m *SetServerRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetServerRole) XXX_Merge Uses

func (m *SetServerRole) XXX_Merge(src proto.Message)

func (*SetServerRole) XXX_Size Uses

func (m *SetServerRole) XXX_Size() int

func (*SetServerRole) XXX_Unmarshal Uses

func (m *SetServerRole) XXX_Unmarshal(b []byte) error

type SetServerState Uses

type SetServerState struct {
    ServerState          *ServerState `protobuf:"bytes,1,opt,name=serverState,proto3" json:"serverState,omitempty"`
    XXX_NoUnkeyedLiteral struct{}     `json:"-"`
    XXX_unrecognized     []byte       `json:"-"`
    XXX_sizecache        int32        `json:"-"`
}

func (*SetServerState) Descriptor Uses

func (*SetServerState) Descriptor() ([]byte, []int)

func (*SetServerState) GetServerState Uses

func (m *SetServerState) GetServerState() *ServerState

func (*SetServerState) Marshal Uses

func (m *SetServerState) Marshal() (dAtA []byte, err error)

func (*SetServerState) MarshalTo Uses

func (m *SetServerState) MarshalTo(dAtA []byte) (int, error)

func (*SetServerState) MarshalToSizedBuffer Uses

func (m *SetServerState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SetServerState) ProtoMessage Uses

func (*SetServerState) ProtoMessage()

func (*SetServerState) Reset Uses

func (m *SetServerState) Reset()

func (*SetServerState) Size Uses

func (m *SetServerState) Size() (n int)

func (*SetServerState) String Uses

func (m *SetServerState) String() string

func (*SetServerState) Unmarshal Uses

func (m *SetServerState) Unmarshal(dAtA []byte) error

func (*SetServerState) XXX_DiscardUnknown Uses

func (m *SetServerState) XXX_DiscardUnknown()

func (*SetServerState) XXX_Marshal Uses

func (m *SetServerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetServerState) XXX_Merge Uses

func (m *SetServerState) XXX_Merge(src proto.Message)

func (*SetServerState) XXX_Size Uses

func (m *SetServerState) XXX_Size() int

func (*SetServerState) XXX_Unmarshal Uses

func (m *SetServerState) XXX_Unmarshal(b []byte) error

type Sharder Uses

type Sharder interface {
    GetAddress(shard uint64, version int64) (string, bool, error)
    GetShardToAddress(version int64) (map[uint64]string, error)

    Register(address string, servers []Server) error
    RegisterFrontends(address string, frontends []Frontend) error
    AssignRoles(address string) error
}

Sharder distributes shards between a set of servers.

func NewLocalSharder Uses

func NewLocalSharder(addresses []string, numShards uint64) Sharder

NewLocalSharder creates a Sharder user a list of addresses.

func NewSharder Uses

func NewSharder(discoveryClient discovery.Client, numShards uint64, namespace string) Sharder

NewSharder creates a Sharder using a discovery client.

type StartAssignRoles Uses

type StartAssignRoles struct {
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*StartAssignRoles) Descriptor Uses

func (*StartAssignRoles) Descriptor() ([]byte, []int)

func (*StartAssignRoles) Marshal Uses

func (m *StartAssignRoles) Marshal() (dAtA []byte, err error)

func (*StartAssignRoles) MarshalTo Uses

func (m *StartAssignRoles) MarshalTo(dAtA []byte) (int, error)

func (*StartAssignRoles) MarshalToSizedBuffer Uses

func (m *StartAssignRoles) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StartAssignRoles) ProtoMessage Uses

func (*StartAssignRoles) ProtoMessage()

func (*StartAssignRoles) Reset Uses

func (m *StartAssignRoles) Reset()

func (*StartAssignRoles) Size Uses

func (m *StartAssignRoles) Size() (n int)

func (*StartAssignRoles) String Uses

func (m *StartAssignRoles) String() string

func (*StartAssignRoles) Unmarshal Uses

func (m *StartAssignRoles) Unmarshal(dAtA []byte) error

func (*StartAssignRoles) XXX_DiscardUnknown Uses

func (m *StartAssignRoles) XXX_DiscardUnknown()

func (*StartAssignRoles) XXX_Marshal Uses

func (m *StartAssignRoles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StartAssignRoles) XXX_Merge Uses

func (m *StartAssignRoles) XXX_Merge(src proto.Message)

func (*StartAssignRoles) XXX_Size Uses

func (m *StartAssignRoles) XXX_Size() int

func (*StartAssignRoles) XXX_Unmarshal Uses

func (m *StartAssignRoles) XXX_Unmarshal(b []byte) error

type StartRegister Uses

type StartRegister struct {
    Address              string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*StartRegister) Descriptor Uses

func (*StartRegister) Descriptor() ([]byte, []int)

func (*StartRegister) GetAddress Uses

func (m *StartRegister) GetAddress() string

func (*StartRegister) Marshal Uses

func (m *StartRegister) Marshal() (dAtA []byte, err error)

func (*StartRegister) MarshalTo Uses

func (m *StartRegister) MarshalTo(dAtA []byte) (int, error)

func (*StartRegister) MarshalToSizedBuffer Uses

func (m *StartRegister) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StartRegister) ProtoMessage Uses

func (*StartRegister) ProtoMessage()

func (*StartRegister) Reset Uses

func (m *StartRegister) Reset()

func (*StartRegister) Size Uses

func (m *StartRegister) Size() (n int)

func (*StartRegister) String Uses

func (m *StartRegister) String() string

func (*StartRegister) Unmarshal Uses

func (m *StartRegister) Unmarshal(dAtA []byte) error

func (*StartRegister) XXX_DiscardUnknown Uses

func (m *StartRegister) XXX_DiscardUnknown()

func (*StartRegister) XXX_Marshal Uses

func (m *StartRegister) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StartRegister) XXX_Merge Uses

func (m *StartRegister) XXX_Merge(src proto.Message)

func (*StartRegister) XXX_Size Uses

func (m *StartRegister) XXX_Size() int

func (*StartRegister) XXX_Unmarshal Uses

func (m *StartRegister) XXX_Unmarshal(b []byte) error

type Version Uses

type Version struct {
    Result               int64    `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
    Error                string   `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Version) Descriptor Uses

func (*Version) Descriptor() ([]byte, []int)

func (*Version) GetError Uses

func (m *Version) GetError() string

func (*Version) GetResult Uses

func (m *Version) GetResult() int64

func (*Version) Marshal Uses

func (m *Version) Marshal() (dAtA []byte, err error)

func (*Version) MarshalTo Uses

func (m *Version) MarshalTo(dAtA []byte) (int, error)

func (*Version) MarshalToSizedBuffer Uses

func (m *Version) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Version) ProtoMessage Uses

func (*Version) ProtoMessage()

func (*Version) Reset Uses

func (m *Version) Reset()

func (*Version) Size Uses

func (m *Version) Size() (n int)

func (*Version) String Uses

func (m *Version) String() string

func (*Version) Unmarshal Uses

func (m *Version) Unmarshal(dAtA []byte) error

func (*Version) XXX_DiscardUnknown Uses

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal Uses

func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Version) XXX_Merge Uses

func (m *Version) XXX_Merge(src proto.Message)

func (*Version) XXX_Size Uses

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal Uses

func (m *Version) XXX_Unmarshal(b []byte) error

Package shard imports 16 packages (graph) and is imported by 6 packages. Updated 2019-09-06. Refresh now. Tools for package owners.