Documentation
¶
Index ¶
- Constants
- Variables
- func BootstrapAndJoin(ctx context.Context, bootstrapURL string, dataPath string, metaPath string) error
- func DoBootstrap(ctx context.Context, seedURL string, dataPath string, metaPath string) error
- func InitializeMaybe(ctx context.Context) error
- func JoinCluster(ctx context.Context) error
- func RegisterBootstrapServer(s grpc.ServiceRegistrar, srv BootstrapServer)
- type BootstrapClient
- type BootstrapData
- func (*BootstrapData) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapData) GetData() []byte
- func (x *BootstrapData) GetVersion() int64
- func (*BootstrapData) ProtoMessage()
- func (x *BootstrapData) ProtoReflect() protoreflect.Message
- func (x *BootstrapData) Reset()
- func (x *BootstrapData) String() string
- type BootstrapRequest
- type BootstrapResponse
- func (*BootstrapResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapResponse) GetBootstrapData() *BootstrapData
- func (x *BootstrapResponse) GetIncompatibleVersion() *IncompatibleVersion
- func (x *BootstrapResponse) GetResponse() isBootstrapResponse_Response
- func (*BootstrapResponse) ProtoMessage()
- func (x *BootstrapResponse) ProtoReflect() protoreflect.Message
- func (x *BootstrapResponse) Reset()
- func (x *BootstrapResponse) String() string
- type BootstrapResponse_BootstrapData
- type BootstrapResponse_IncompatibleVersion
- type BootstrapServer
- type Bootstrap_GetBootstrapDataClient
- type Bootstrap_GetBootstrapDataServer
- type DatabaseSnapshot
- func (*DatabaseSnapshot) Descriptor() ([]byte, []int)deprecated
- func (x *DatabaseSnapshot) GetDataEntries() []*KVEntry
- func (x *DatabaseSnapshot) GetMetaEntries() []*KVEntry
- func (*DatabaseSnapshot) ProtoMessage()
- func (x *DatabaseSnapshot) ProtoReflect() protoreflect.Message
- func (x *DatabaseSnapshot) Reset()
- func (x *DatabaseSnapshot) String() string
- type IncompatibleVersion
- func (*IncompatibleVersion) Descriptor() ([]byte, []int)deprecated
- func (x *IncompatibleVersion) GetNeedsVersion() int64
- func (*IncompatibleVersion) ProtoMessage()
- func (x *IncompatibleVersion) ProtoReflect() protoreflect.Message
- func (x *IncompatibleVersion) Reset()
- func (x *IncompatibleVersion) String() string
- type KVEntry
- type Server
- type UnimplementedBootstrapServer
- type UnsafeBootstrapServer
Constants ¶
const (
Bootstrap_GetBootstrapData_FullMethodName = "/atlas.bootstrap.Bootstrap/GetBootstrapData"
)
Variables ¶
var Bootstrap_ServiceDesc = grpc.ServiceDesc{ ServiceName: "atlas.bootstrap.Bootstrap", HandlerType: (*BootstrapServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "GetBootstrapData", Handler: _Bootstrap_GetBootstrapData_Handler, ServerStreams: true, }, }, Metadata: "bootstrap/bootstrap.proto", }
Bootstrap_ServiceDesc is the grpc.ServiceDesc for Bootstrap service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_bootstrap_bootstrap_proto protoreflect.FileDescriptor
Functions ¶
func BootstrapAndJoin ¶
func BootstrapAndJoin(ctx context.Context, bootstrapURL string, dataPath string, metaPath string) error
BootstrapAndJoin performs a complete bootstrap: downloads cluster state and registers as new node
func DoBootstrap ¶
DoBootstrap connects to a seed node, follows cluster config, proposes adding self, and waits until we see ourselves in the committed config.
func InitializeMaybe ¶
InitializeMaybe checks if the database is empty and initializes it if it is
func JoinCluster ¶
func RegisterBootstrapServer ¶ added in v0.1.0
func RegisterBootstrapServer(s grpc.ServiceRegistrar, srv BootstrapServer)
Types ¶
type BootstrapClient ¶ added in v0.1.0
type BootstrapClient interface {
GetBootstrapData(ctx context.Context, in *BootstrapRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BootstrapResponse], error)
}
BootstrapClient is the client API for Bootstrap service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewBootstrapClient ¶ added in v0.1.0
func NewBootstrapClient(cc grpc.ClientConnInterface) BootstrapClient
type BootstrapData ¶ added in v0.1.0
type BootstrapData struct {
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*BootstrapData) Descriptor
deprecated
added in
v0.1.0
func (*BootstrapData) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapData.ProtoReflect.Descriptor instead.
func (*BootstrapData) GetData ¶ added in v0.1.0
func (x *BootstrapData) GetData() []byte
func (*BootstrapData) GetVersion ¶ added in v0.1.0
func (x *BootstrapData) GetVersion() int64
func (*BootstrapData) ProtoMessage ¶ added in v0.1.0
func (*BootstrapData) ProtoMessage()
func (*BootstrapData) ProtoReflect ¶ added in v0.1.0
func (x *BootstrapData) ProtoReflect() protoreflect.Message
func (*BootstrapData) Reset ¶ added in v0.1.0
func (x *BootstrapData) Reset()
func (*BootstrapData) String ¶ added in v0.1.0
func (x *BootstrapData) String() string
type BootstrapRequest ¶ added in v0.1.0
type BootstrapRequest struct {
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// contains filtered or unexported fields
}
func (*BootstrapRequest) Descriptor
deprecated
added in
v0.1.0
func (*BootstrapRequest) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapRequest.ProtoReflect.Descriptor instead.
func (*BootstrapRequest) GetVersion ¶ added in v0.1.0
func (x *BootstrapRequest) GetVersion() int64
func (*BootstrapRequest) ProtoMessage ¶ added in v0.1.0
func (*BootstrapRequest) ProtoMessage()
func (*BootstrapRequest) ProtoReflect ¶ added in v0.1.0
func (x *BootstrapRequest) ProtoReflect() protoreflect.Message
func (*BootstrapRequest) Reset ¶ added in v0.1.0
func (x *BootstrapRequest) Reset()
func (*BootstrapRequest) String ¶ added in v0.1.0
func (x *BootstrapRequest) String() string
type BootstrapResponse ¶ added in v0.1.0
type BootstrapResponse struct {
// Types that are valid to be assigned to Response:
//
// *BootstrapResponse_IncompatibleVersion
// *BootstrapResponse_BootstrapData
Response isBootstrapResponse_Response `protobuf_oneof:"response"`
// contains filtered or unexported fields
}
func (*BootstrapResponse) Descriptor
deprecated
added in
v0.1.0
func (*BootstrapResponse) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapResponse.ProtoReflect.Descriptor instead.
func (*BootstrapResponse) GetBootstrapData ¶ added in v0.1.0
func (x *BootstrapResponse) GetBootstrapData() *BootstrapData
func (*BootstrapResponse) GetIncompatibleVersion ¶ added in v0.1.0
func (x *BootstrapResponse) GetIncompatibleVersion() *IncompatibleVersion
func (*BootstrapResponse) GetResponse ¶ added in v0.1.0
func (x *BootstrapResponse) GetResponse() isBootstrapResponse_Response
func (*BootstrapResponse) ProtoMessage ¶ added in v0.1.0
func (*BootstrapResponse) ProtoMessage()
func (*BootstrapResponse) ProtoReflect ¶ added in v0.1.0
func (x *BootstrapResponse) ProtoReflect() protoreflect.Message
func (*BootstrapResponse) Reset ¶ added in v0.1.0
func (x *BootstrapResponse) Reset()
func (*BootstrapResponse) String ¶ added in v0.1.0
func (x *BootstrapResponse) String() string
type BootstrapResponse_BootstrapData ¶ added in v0.1.0
type BootstrapResponse_BootstrapData struct {
BootstrapData *BootstrapData `protobuf:"bytes,2,opt,name=bootstrapData,proto3,oneof"`
}
type BootstrapResponse_IncompatibleVersion ¶ added in v0.1.0
type BootstrapResponse_IncompatibleVersion struct {
IncompatibleVersion *IncompatibleVersion `protobuf:"bytes,1,opt,name=incompatibleVersion,proto3,oneof"`
}
type BootstrapServer ¶ added in v0.1.0
type BootstrapServer interface {
GetBootstrapData(*BootstrapRequest, grpc.ServerStreamingServer[BootstrapResponse]) error
// contains filtered or unexported methods
}
BootstrapServer is the server API for Bootstrap service. All implementations must embed UnimplementedBootstrapServer for forward compatibility.
type Bootstrap_GetBootstrapDataClient ¶ added in v0.1.0
type Bootstrap_GetBootstrapDataClient = grpc.ServerStreamingClient[BootstrapResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Bootstrap_GetBootstrapDataServer ¶ added in v0.1.0
type Bootstrap_GetBootstrapDataServer = grpc.ServerStreamingServer[BootstrapResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DatabaseSnapshot ¶ added in v0.1.0
type DatabaseSnapshot struct {
MetaEntries []*KVEntry `protobuf:"bytes,1,rep,name=MetaEntries,proto3" json:"MetaEntries,omitempty"`
DataEntries []*KVEntry `protobuf:"bytes,2,rep,name=DataEntries,proto3" json:"DataEntries,omitempty"`
// contains filtered or unexported fields
}
func (*DatabaseSnapshot) Descriptor
deprecated
added in
v0.1.0
func (*DatabaseSnapshot) Descriptor() ([]byte, []int)
Deprecated: Use DatabaseSnapshot.ProtoReflect.Descriptor instead.
func (*DatabaseSnapshot) GetDataEntries ¶ added in v0.1.0
func (x *DatabaseSnapshot) GetDataEntries() []*KVEntry
func (*DatabaseSnapshot) GetMetaEntries ¶ added in v0.1.0
func (x *DatabaseSnapshot) GetMetaEntries() []*KVEntry
func (*DatabaseSnapshot) ProtoMessage ¶ added in v0.1.0
func (*DatabaseSnapshot) ProtoMessage()
func (*DatabaseSnapshot) ProtoReflect ¶ added in v0.1.0
func (x *DatabaseSnapshot) ProtoReflect() protoreflect.Message
func (*DatabaseSnapshot) Reset ¶ added in v0.1.0
func (x *DatabaseSnapshot) Reset()
func (*DatabaseSnapshot) String ¶ added in v0.1.0
func (x *DatabaseSnapshot) String() string
type IncompatibleVersion ¶ added in v0.1.0
type IncompatibleVersion struct {
NeedsVersion int64 `protobuf:"varint,1,opt,name=needsVersion,proto3" json:"needsVersion,omitempty"`
// contains filtered or unexported fields
}
func (*IncompatibleVersion) Descriptor
deprecated
added in
v0.1.0
func (*IncompatibleVersion) Descriptor() ([]byte, []int)
Deprecated: Use IncompatibleVersion.ProtoReflect.Descriptor instead.
func (*IncompatibleVersion) GetNeedsVersion ¶ added in v0.1.0
func (x *IncompatibleVersion) GetNeedsVersion() int64
func (*IncompatibleVersion) ProtoMessage ¶ added in v0.1.0
func (*IncompatibleVersion) ProtoMessage()
func (*IncompatibleVersion) ProtoReflect ¶ added in v0.1.0
func (x *IncompatibleVersion) ProtoReflect() protoreflect.Message
func (*IncompatibleVersion) Reset ¶ added in v0.1.0
func (x *IncompatibleVersion) Reset()
func (*IncompatibleVersion) String ¶ added in v0.1.0
func (x *IncompatibleVersion) String() string
type KVEntry ¶ added in v0.1.0
type KVEntry struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*KVEntry) Descriptor
deprecated
added in
v0.1.0
func (*KVEntry) ProtoMessage ¶ added in v0.1.0
func (*KVEntry) ProtoMessage()
func (*KVEntry) ProtoReflect ¶ added in v0.1.0
func (x *KVEntry) ProtoReflect() protoreflect.Message
type Server ¶
type Server struct {
UnimplementedBootstrapServer
}
func (*Server) GetBootstrapData ¶
func (b *Server) GetBootstrapData(request *BootstrapRequest, stream Bootstrap_GetBootstrapDataServer) (err error)
type UnimplementedBootstrapServer ¶ added in v0.1.0
type UnimplementedBootstrapServer struct{}
UnimplementedBootstrapServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedBootstrapServer) GetBootstrapData ¶ added in v0.1.0
func (UnimplementedBootstrapServer) GetBootstrapData(*BootstrapRequest, grpc.ServerStreamingServer[BootstrapResponse]) error
type UnsafeBootstrapServer ¶ added in v0.1.0
type UnsafeBootstrapServer interface {
// contains filtered or unexported methods
}
UnsafeBootstrapServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BootstrapServer will result in compilation errors.