open-vault/physical/raft/types.pb.go

312 lines
10 KiB
Go
Raw Normal View History

Raft Storage Backend (#6888) * Work on raft backend * Add logstore locally * Add encryptor and unsealable interfaces * Add clustering support to raft * Remove client and handler * Bootstrap raft on init * Cleanup raft logic a bit * More raft work * Work on TLS config * More work on bootstrapping * Fix build * More work on bootstrapping * More bootstrapping work * fix build * Remove consul dep * Fix build * merged oss/master into raft-storage * Work on bootstrapping * Get bootstrapping to work * Clean up FMS and node-id * Update local node ID logic * Cleanup node-id change * Work on snapshotting * Raft: Add remove peer API (#906) * Add remove peer API * Add some comments * Fix existing snapshotting (#909) * Raft get peers API (#912) * Read raft configuration * address review feedback * Use the Leadership Transfer API to step-down the active node (#918) * Raft join and unseal using Shamir keys (#917) * Raft join using shamir * Store AEAD instead of master key * Split the raft join process to answer the challenge after a successful unseal * get the follower to standby state * Make unseal work * minor changes * Some input checks * reuse the shamir seal access instead of new default seal access * refactor joinRaftSendAnswer function * Synchronously send answer in auto-unseal case * Address review feedback * Raft snapshots (#910) * Fix existing snapshotting * implement the noop snapshotting * Add comments and switch log libraries * add some snapshot tests * add snapshot test file * add TODO * More work on raft snapshotting * progress on the ConfigStore strategy * Don't use two buckets * Update the snapshot store logic to hide the file logic * Add more backend tests * Cleanup code a bit * [WIP] Raft recovery (#938) * Add recovery functionality * remove fmt.Printfs * Fix a few fsm bugs * Add max size value for raft backend (#942) * Add max size value for raft backend * Include physical.ErrValueTooLarge in the message * Raft snapshot Take/Restore API (#926) * Inital work on raft snapshot APIs * Always redirect snapshot install/download requests * More work on the snapshot APIs * Cleanup code a bit * On restore handle special cases * Use the seal to encrypt the sha sum file * Add sealer mechanism and fix some bugs * Call restore while state lock is held * Send restore cb trigger through raft log * Make error messages nicer * Add test helpers * Add snapshot test * Add shamir unseal test * Add more raft snapshot API tests * Fix locking * Change working to initalize * Add underlying raw object to test cluster core * Move leaderUUID to core * Add raft TLS rotation logic (#950) * Add TLS rotation logic * Cleanup logic a bit * Add/Remove from follower state on add/remove peer * add comments * Update more comments * Update request_forwarding_service.proto * Make sure we populate all nodes in the followerstate obj * Update times * Apply review feedback * Add more raft config setting (#947) * Add performance config setting * Add more config options and fix tests * Test Raft Recovery (#944) * Test raft recovery * Leave out a node during recovery * remove unused struct * Update physical/raft/snapshot_test.go * Update physical/raft/snapshot_test.go * fix vendoring * Switch to new raft interface * Remove unused files * Switch a gogo -> proto instance * Remove unneeded vault dep in go.sum * Update helper/testhelpers/testhelpers.go Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com> * Update vault/cluster/cluster.go * track active key within the keyring itself (#6915) * track active key within the keyring itself * lookup and store using the active key ID * update docstring * minor refactor * Small text fixes (#6912) * Update physical/raft/raft.go Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com> * review feedback * Move raft logical system into separate file * Update help text a bit * Enforce cluster addr is set and use it for raft bootstrapping * Fix tests * fix http test panic * Pull in latest raft-snapshot library * Add comment
2019-06-20 19:14:58 +00:00
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: physical/raft/types.proto
package raft
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
Raft Storage Backend (#6888) * Work on raft backend * Add logstore locally * Add encryptor and unsealable interfaces * Add clustering support to raft * Remove client and handler * Bootstrap raft on init * Cleanup raft logic a bit * More raft work * Work on TLS config * More work on bootstrapping * Fix build * More work on bootstrapping * More bootstrapping work * fix build * Remove consul dep * Fix build * merged oss/master into raft-storage * Work on bootstrapping * Get bootstrapping to work * Clean up FMS and node-id * Update local node ID logic * Cleanup node-id change * Work on snapshotting * Raft: Add remove peer API (#906) * Add remove peer API * Add some comments * Fix existing snapshotting (#909) * Raft get peers API (#912) * Read raft configuration * address review feedback * Use the Leadership Transfer API to step-down the active node (#918) * Raft join and unseal using Shamir keys (#917) * Raft join using shamir * Store AEAD instead of master key * Split the raft join process to answer the challenge after a successful unseal * get the follower to standby state * Make unseal work * minor changes * Some input checks * reuse the shamir seal access instead of new default seal access * refactor joinRaftSendAnswer function * Synchronously send answer in auto-unseal case * Address review feedback * Raft snapshots (#910) * Fix existing snapshotting * implement the noop snapshotting * Add comments and switch log libraries * add some snapshot tests * add snapshot test file * add TODO * More work on raft snapshotting * progress on the ConfigStore strategy * Don't use two buckets * Update the snapshot store logic to hide the file logic * Add more backend tests * Cleanup code a bit * [WIP] Raft recovery (#938) * Add recovery functionality * remove fmt.Printfs * Fix a few fsm bugs * Add max size value for raft backend (#942) * Add max size value for raft backend * Include physical.ErrValueTooLarge in the message * Raft snapshot Take/Restore API (#926) * Inital work on raft snapshot APIs * Always redirect snapshot install/download requests * More work on the snapshot APIs * Cleanup code a bit * On restore handle special cases * Use the seal to encrypt the sha sum file * Add sealer mechanism and fix some bugs * Call restore while state lock is held * Send restore cb trigger through raft log * Make error messages nicer * Add test helpers * Add snapshot test * Add shamir unseal test * Add more raft snapshot API tests * Fix locking * Change working to initalize * Add underlying raw object to test cluster core * Move leaderUUID to core * Add raft TLS rotation logic (#950) * Add TLS rotation logic * Cleanup logic a bit * Add/Remove from follower state on add/remove peer * add comments * Update more comments * Update request_forwarding_service.proto * Make sure we populate all nodes in the followerstate obj * Update times * Apply review feedback * Add more raft config setting (#947) * Add performance config setting * Add more config options and fix tests * Test Raft Recovery (#944) * Test raft recovery * Leave out a node during recovery * remove unused struct * Update physical/raft/snapshot_test.go * Update physical/raft/snapshot_test.go * fix vendoring * Switch to new raft interface * Remove unused files * Switch a gogo -> proto instance * Remove unneeded vault dep in go.sum * Update helper/testhelpers/testhelpers.go Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com> * Update vault/cluster/cluster.go * track active key within the keyring itself (#6915) * track active key within the keyring itself * lookup and store using the active key ID * update docstring * minor refactor * Small text fixes (#6912) * Update physical/raft/raft.go Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com> * review feedback * Move raft logical system into separate file * Update help text a bit * Enforce cluster addr is set and use it for raft bootstrapping * Fix tests * fix http test panic * Pull in latest raft-snapshot library * Add comment
2019-06-20 19:14:58 +00:00
type LogOperation struct {
// OpType is the Operation type
OpType uint32 `protobuf:"varint,1,opt,name=op_type,json=opType,proto3" json:"op_type,omitempty"`
// Flags is an opaque value, currently unused. Reserved.
Flags uint64 `protobuf:"varint,2,opt,name=flags,proto3" json:"flags,omitempty"`
// Key that is being affected
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
// Value is optional, corresponds to the key
Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LogOperation) Reset() { *m = LogOperation{} }
func (m *LogOperation) String() string { return proto.CompactTextString(m) }
func (*LogOperation) ProtoMessage() {}
func (*LogOperation) Descriptor() ([]byte, []int) {
return fileDescriptor_a8b3efb4def82ab3, []int{0}
}
func (m *LogOperation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LogOperation.Unmarshal(m, b)
}
func (m *LogOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LogOperation.Marshal(b, m, deterministic)
}
func (m *LogOperation) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogOperation.Merge(m, src)
}
func (m *LogOperation) XXX_Size() int {
return xxx_messageInfo_LogOperation.Size(m)
}
func (m *LogOperation) XXX_DiscardUnknown() {
xxx_messageInfo_LogOperation.DiscardUnknown(m)
}
var xxx_messageInfo_LogOperation proto.InternalMessageInfo
func (m *LogOperation) GetOpType() uint32 {
if m != nil {
return m.OpType
}
return 0
}
func (m *LogOperation) GetFlags() uint64 {
if m != nil {
return m.Flags
}
return 0
}
func (m *LogOperation) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *LogOperation) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
type LogData struct {
Operations []*LogOperation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LogData) Reset() { *m = LogData{} }
func (m *LogData) String() string { return proto.CompactTextString(m) }
func (*LogData) ProtoMessage() {}
func (*LogData) Descriptor() ([]byte, []int) {
return fileDescriptor_a8b3efb4def82ab3, []int{1}
}
func (m *LogData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LogData.Unmarshal(m, b)
}
func (m *LogData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LogData.Marshal(b, m, deterministic)
}
func (m *LogData) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogData.Merge(m, src)
}
func (m *LogData) XXX_Size() int {
return xxx_messageInfo_LogData.Size(m)
}
func (m *LogData) XXX_DiscardUnknown() {
xxx_messageInfo_LogData.DiscardUnknown(m)
}
var xxx_messageInfo_LogData proto.InternalMessageInfo
func (m *LogData) GetOperations() []*LogOperation {
if m != nil {
return m.Operations
}
return nil
}
type IndexValue struct {
Term uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IndexValue) Reset() { *m = IndexValue{} }
func (m *IndexValue) String() string { return proto.CompactTextString(m) }
func (*IndexValue) ProtoMessage() {}
func (*IndexValue) Descriptor() ([]byte, []int) {
return fileDescriptor_a8b3efb4def82ab3, []int{2}
}
func (m *IndexValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IndexValue.Unmarshal(m, b)
}
func (m *IndexValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IndexValue.Marshal(b, m, deterministic)
}
func (m *IndexValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_IndexValue.Merge(m, src)
}
func (m *IndexValue) XXX_Size() int {
return xxx_messageInfo_IndexValue.Size(m)
}
func (m *IndexValue) XXX_DiscardUnknown() {
xxx_messageInfo_IndexValue.DiscardUnknown(m)
}
var xxx_messageInfo_IndexValue proto.InternalMessageInfo
func (m *IndexValue) GetTerm() uint64 {
if m != nil {
return m.Term
}
return 0
}
func (m *IndexValue) GetIndex() uint64 {
if m != nil {
return m.Index
}
return 0
}
type Server struct {
Suffrage int32 `protobuf:"varint,1,opt,name=suffrage,proto3" json:"suffrage,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Server) Reset() { *m = Server{} }
func (m *Server) String() string { return proto.CompactTextString(m) }
func (*Server) ProtoMessage() {}
func (*Server) Descriptor() ([]byte, []int) {
return fileDescriptor_a8b3efb4def82ab3, []int{3}
}
func (m *Server) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Server.Unmarshal(m, b)
}
func (m *Server) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Server.Marshal(b, m, deterministic)
}
func (m *Server) XXX_Merge(src proto.Message) {
xxx_messageInfo_Server.Merge(m, src)
}
func (m *Server) XXX_Size() int {
return xxx_messageInfo_Server.Size(m)
}
func (m *Server) XXX_DiscardUnknown() {
xxx_messageInfo_Server.DiscardUnknown(m)
}
var xxx_messageInfo_Server proto.InternalMessageInfo
func (m *Server) GetSuffrage() int32 {
if m != nil {
return m.Suffrage
}
return 0
}
func (m *Server) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Server) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
type ConfigurationValue struct {
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
Servers []*Server `protobuf:"bytes,2,rep,name=servers,proto3" json:"servers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConfigurationValue) Reset() { *m = ConfigurationValue{} }
func (m *ConfigurationValue) String() string { return proto.CompactTextString(m) }
func (*ConfigurationValue) ProtoMessage() {}
func (*ConfigurationValue) Descriptor() ([]byte, []int) {
return fileDescriptor_a8b3efb4def82ab3, []int{4}
}
func (m *ConfigurationValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfigurationValue.Unmarshal(m, b)
}
func (m *ConfigurationValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConfigurationValue.Marshal(b, m, deterministic)
}
func (m *ConfigurationValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfigurationValue.Merge(m, src)
}
func (m *ConfigurationValue) XXX_Size() int {
return xxx_messageInfo_ConfigurationValue.Size(m)
}
func (m *ConfigurationValue) XXX_DiscardUnknown() {
xxx_messageInfo_ConfigurationValue.DiscardUnknown(m)
}
var xxx_messageInfo_ConfigurationValue proto.InternalMessageInfo
func (m *ConfigurationValue) GetIndex() uint64 {
if m != nil {
return m.Index
}
return 0
}
func (m *ConfigurationValue) GetServers() []*Server {
if m != nil {
return m.Servers
}
return nil
}
func init() {
proto.RegisterType((*LogOperation)(nil), "raft.LogOperation")
proto.RegisterType((*LogData)(nil), "raft.LogData")
proto.RegisterType((*IndexValue)(nil), "raft.IndexValue")
proto.RegisterType((*Server)(nil), "raft.Server")
proto.RegisterType((*ConfigurationValue)(nil), "raft.ConfigurationValue")
}
func init() { proto.RegisterFile("physical/raft/types.proto", fileDescriptor_a8b3efb4def82ab3) }
var fileDescriptor_a8b3efb4def82ab3 = []byte{
// 322 bytes of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