12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638 |
- // Code generated by protoc-gen-gogo.
- // source: raft.proto
- // DO NOT EDIT!
- package api
- import proto "github.com/gogo/protobuf/proto"
- import fmt "fmt"
- import math "math"
- import raftpb "github.com/coreos/etcd/raft/raftpb"
- // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
- // skipping weak import docker_protobuf_plugin "github.com/docker/swarmkit/protobuf/plugin"
- import github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
- import (
- context "golang.org/x/net/context"
- grpc "google.golang.org/grpc"
- )
- import raftselector "github.com/docker/swarmkit/manager/raftselector"
- import codes "google.golang.org/grpc/codes"
- import metadata "google.golang.org/grpc/metadata"
- import transport "google.golang.org/grpc/transport"
- import rafttime "time"
- import strings "strings"
- import reflect "reflect"
- import io "io"
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // StoreActionKind defines the operation to take on the store for the target of
- // a storage action.
- type StoreActionKind int32
- const (
- StoreActionKindUnknown StoreActionKind = 0
- StoreActionKindCreate StoreActionKind = 1
- StoreActionKindUpdate StoreActionKind = 2
- StoreActionKindRemove StoreActionKind = 3
- )
- var StoreActionKind_name = map[int32]string{
- 0: "UNKNOWN",
- 1: "STORE_ACTION_CREATE",
- 2: "STORE_ACTION_UPDATE",
- 3: "STORE_ACTION_REMOVE",
- }
- var StoreActionKind_value = map[string]int32{
- "UNKNOWN": 0,
- "STORE_ACTION_CREATE": 1,
- "STORE_ACTION_UPDATE": 2,
- "STORE_ACTION_REMOVE": 3,
- }
- func (x StoreActionKind) String() string {
- return proto.EnumName(StoreActionKind_name, int32(x))
- }
- func (StoreActionKind) EnumDescriptor() ([]byte, []int) { return fileDescriptorRaft, []int{0} }
- type RaftMember struct {
- // RaftID specifies the internal ID used by the manager in a raft context, it can never be modified
- // and is used only for information purposes
- RaftID uint64 `protobuf:"varint,1,opt,name=raft_id,json=raftId,proto3" json:"raft_id,omitempty"`
- // NodeID is the node's ID.
- NodeID string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
- // Addr specifies the address of the member
- Addr string `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"`
- // Status provides the current status of the manager from the perspective of another manager.
- Status RaftMemberStatus `protobuf:"bytes,4,opt,name=status" json:"status"`
- }
- func (m *RaftMember) Reset() { *m = RaftMember{} }
- func (*RaftMember) ProtoMessage() {}
- func (*RaftMember) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{0} }
- type JoinRequest struct {
- // Addr specifies the address of the member
- Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
- }
- func (m *JoinRequest) Reset() { *m = JoinRequest{} }
- func (*JoinRequest) ProtoMessage() {}
- func (*JoinRequest) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{1} }
- type JoinResponse struct {
- // RaftID is the ID assigned to the new member.
- RaftID uint64 `protobuf:"varint,1,opt,name=raft_id,json=raftId,proto3" json:"raft_id,omitempty"`
- // Members is the membership set of the cluster.
- Members []*RaftMember `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"`
- // RemovedMembers is a list of members that have been removed from
- // the cluster, so the new node can avoid communicating with them.
- RemovedMembers []uint64 `protobuf:"varint,3,rep,name=removed_members,json=removedMembers" json:"removed_members,omitempty"`
- }
- func (m *JoinResponse) Reset() { *m = JoinResponse{} }
- func (*JoinResponse) ProtoMessage() {}
- func (*JoinResponse) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{2} }
- type LeaveRequest struct {
- Node *RaftMember `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
- }
- func (m *LeaveRequest) Reset() { *m = LeaveRequest{} }
- func (*LeaveRequest) ProtoMessage() {}
- func (*LeaveRequest) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{3} }
- type LeaveResponse struct {
- }
- func (m *LeaveResponse) Reset() { *m = LeaveResponse{} }
- func (*LeaveResponse) ProtoMessage() {}
- func (*LeaveResponse) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{4} }
- type ProcessRaftMessageRequest struct {
- Message *raftpb.Message `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
- }
- func (m *ProcessRaftMessageRequest) Reset() { *m = ProcessRaftMessageRequest{} }
- func (*ProcessRaftMessageRequest) ProtoMessage() {}
- func (*ProcessRaftMessageRequest) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{5} }
- type ProcessRaftMessageResponse struct {
- }
- func (m *ProcessRaftMessageResponse) Reset() { *m = ProcessRaftMessageResponse{} }
- func (*ProcessRaftMessageResponse) ProtoMessage() {}
- func (*ProcessRaftMessageResponse) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{6} }
- type ResolveAddressRequest struct {
- // raft_id is the ID to resolve to an address.
- RaftID uint64 `protobuf:"varint,1,opt,name=raft_id,json=raftId,proto3" json:"raft_id,omitempty"`
- }
- func (m *ResolveAddressRequest) Reset() { *m = ResolveAddressRequest{} }
- func (*ResolveAddressRequest) ProtoMessage() {}
- func (*ResolveAddressRequest) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{7} }
- type ResolveAddressResponse struct {
- // Addr specifies the address of the member
- Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
- }
- func (m *ResolveAddressResponse) Reset() { *m = ResolveAddressResponse{} }
- func (*ResolveAddressResponse) ProtoMessage() {}
- func (*ResolveAddressResponse) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{8} }
- // Contains one of many protobuf encoded objects to replicate
- // over the raft backend with a request ID to track when the
- // action is effectively applied
- type InternalRaftRequest struct {
- ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
- Action []StoreAction `protobuf:"bytes,2,rep,name=action" json:"action"`
- }
- func (m *InternalRaftRequest) Reset() { *m = InternalRaftRequest{} }
- func (*InternalRaftRequest) ProtoMessage() {}
- func (*InternalRaftRequest) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{9} }
- // StoreAction defines a target and operation to apply on the storage system.
- type StoreAction struct {
- Action StoreActionKind `protobuf:"varint,1,opt,name=action,proto3,enum=docker.swarmkit.v1.StoreActionKind" json:"action,omitempty"`
- // Types that are valid to be assigned to Target:
- // *StoreAction_Node
- // *StoreAction_Service
- // *StoreAction_Task
- // *StoreAction_Network
- // *StoreAction_Cluster
- // *StoreAction_Secret
- // *StoreAction_Resource
- // *StoreAction_Extension
- // *StoreAction_Config
- Target isStoreAction_Target `protobuf_oneof:"target"`
- }
- func (m *StoreAction) Reset() { *m = StoreAction{} }
- func (*StoreAction) ProtoMessage() {}
- func (*StoreAction) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{10} }
- type isStoreAction_Target interface {
- isStoreAction_Target()
- MarshalTo([]byte) (int, error)
- Size() int
- }
- type StoreAction_Node struct {
- Node *Node `protobuf:"bytes,2,opt,name=node,oneof"`
- }
- type StoreAction_Service struct {
- Service *Service `protobuf:"bytes,3,opt,name=service,oneof"`
- }
- type StoreAction_Task struct {
- Task *Task `protobuf:"bytes,4,opt,name=task,oneof"`
- }
- type StoreAction_Network struct {
- Network *Network `protobuf:"bytes,5,opt,name=network,oneof"`
- }
- type StoreAction_Cluster struct {
- Cluster *Cluster `protobuf:"bytes,6,opt,name=cluster,oneof"`
- }
- type StoreAction_Secret struct {
- Secret *Secret `protobuf:"bytes,7,opt,name=secret,oneof"`
- }
- type StoreAction_Resource struct {
- Resource *Resource `protobuf:"bytes,8,opt,name=resource,oneof"`
- }
- type StoreAction_Extension struct {
- Extension *Extension `protobuf:"bytes,9,opt,name=extension,oneof"`
- }
- type StoreAction_Config struct {
- Config *Config `protobuf:"bytes,10,opt,name=config,oneof"`
- }
- func (*StoreAction_Node) isStoreAction_Target() {}
- func (*StoreAction_Service) isStoreAction_Target() {}
- func (*StoreAction_Task) isStoreAction_Target() {}
- func (*StoreAction_Network) isStoreAction_Target() {}
- func (*StoreAction_Cluster) isStoreAction_Target() {}
- func (*StoreAction_Secret) isStoreAction_Target() {}
- func (*StoreAction_Resource) isStoreAction_Target() {}
- func (*StoreAction_Extension) isStoreAction_Target() {}
- func (*StoreAction_Config) isStoreAction_Target() {}
- func (m *StoreAction) GetTarget() isStoreAction_Target {
- if m != nil {
- return m.Target
- }
- return nil
- }
- func (m *StoreAction) GetNode() *Node {
- if x, ok := m.GetTarget().(*StoreAction_Node); ok {
- return x.Node
- }
- return nil
- }
- func (m *StoreAction) GetService() *Service {
- if x, ok := m.GetTarget().(*StoreAction_Service); ok {
- return x.Service
- }
- return nil
- }
- func (m *StoreAction) GetTask() *Task {
- if x, ok := m.GetTarget().(*StoreAction_Task); ok {
- return x.Task
- }
- return nil
- }
- func (m *StoreAction) GetNetwork() *Network {
- if x, ok := m.GetTarget().(*StoreAction_Network); ok {
- return x.Network
- }
- return nil
- }
- func (m *StoreAction) GetCluster() *Cluster {
- if x, ok := m.GetTarget().(*StoreAction_Cluster); ok {
- return x.Cluster
- }
- return nil
- }
- func (m *StoreAction) GetSecret() *Secret {
- if x, ok := m.GetTarget().(*StoreAction_Secret); ok {
- return x.Secret
- }
- return nil
- }
- func (m *StoreAction) GetResource() *Resource {
- if x, ok := m.GetTarget().(*StoreAction_Resource); ok {
- return x.Resource
- }
- return nil
- }
- func (m *StoreAction) GetExtension() *Extension {
- if x, ok := m.GetTarget().(*StoreAction_Extension); ok {
- return x.Extension
- }
- return nil
- }
- func (m *StoreAction) GetConfig() *Config {
- if x, ok := m.GetTarget().(*StoreAction_Config); ok {
- return x.Config
- }
- return nil
- }
- // XXX_OneofFuncs is for the internal use of the proto package.
- func (*StoreAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
- return _StoreAction_OneofMarshaler, _StoreAction_OneofUnmarshaler, _StoreAction_OneofSizer, []interface{}{
- (*StoreAction_Node)(nil),
- (*StoreAction_Service)(nil),
- (*StoreAction_Task)(nil),
- (*StoreAction_Network)(nil),
- (*StoreAction_Cluster)(nil),
- (*StoreAction_Secret)(nil),
- (*StoreAction_Resource)(nil),
- (*StoreAction_Extension)(nil),
- (*StoreAction_Config)(nil),
- }
- }
- func _StoreAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
- m := msg.(*StoreAction)
- // target
- switch x := m.Target.(type) {
- case *StoreAction_Node:
- _ = b.EncodeVarint(2<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Node); err != nil {
- return err
- }
- case *StoreAction_Service:
- _ = b.EncodeVarint(3<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Service); err != nil {
- return err
- }
- case *StoreAction_Task:
- _ = b.EncodeVarint(4<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Task); err != nil {
- return err
- }
- case *StoreAction_Network:
- _ = b.EncodeVarint(5<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Network); err != nil {
- return err
- }
- case *StoreAction_Cluster:
- _ = b.EncodeVarint(6<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Cluster); err != nil {
- return err
- }
- case *StoreAction_Secret:
- _ = b.EncodeVarint(7<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Secret); err != nil {
- return err
- }
- case *StoreAction_Resource:
- _ = b.EncodeVarint(8<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Resource); err != nil {
- return err
- }
- case *StoreAction_Extension:
- _ = b.EncodeVarint(9<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Extension); err != nil {
- return err
- }
- case *StoreAction_Config:
- _ = b.EncodeVarint(10<<3 | proto.WireBytes)
- if err := b.EncodeMessage(x.Config); err != nil {
- return err
- }
- case nil:
- default:
- return fmt.Errorf("StoreAction.Target has unexpected type %T", x)
- }
- return nil
- }
- func _StoreAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
- m := msg.(*StoreAction)
- switch tag {
- case 2: // target.node
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Node)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Node{msg}
- return true, err
- case 3: // target.service
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Service)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Service{msg}
- return true, err
- case 4: // target.task
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Task)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Task{msg}
- return true, err
- case 5: // target.network
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Network)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Network{msg}
- return true, err
- case 6: // target.cluster
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Cluster)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Cluster{msg}
- return true, err
- case 7: // target.secret
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Secret)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Secret{msg}
- return true, err
- case 8: // target.resource
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Resource)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Resource{msg}
- return true, err
- case 9: // target.extension
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Extension)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Extension{msg}
- return true, err
- case 10: // target.config
- if wire != proto.WireBytes {
- return true, proto.ErrInternalBadWireType
- }
- msg := new(Config)
- err := b.DecodeMessage(msg)
- m.Target = &StoreAction_Config{msg}
- return true, err
- default:
- return false, nil
- }
- }
- func _StoreAction_OneofSizer(msg proto.Message) (n int) {
- m := msg.(*StoreAction)
- // target
- switch x := m.Target.(type) {
- case *StoreAction_Node:
- s := proto.Size(x.Node)
- n += proto.SizeVarint(2<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *StoreAction_Service:
- s := proto.Size(x.Service)
- n += proto.SizeVarint(3<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *StoreAction_Task:
- s := proto.Size(x.Task)
- n += proto.SizeVarint(4<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *StoreAction_Network:
- s := proto.Size(x.Network)
- n += proto.SizeVarint(5<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *StoreAction_Cluster:
- s := proto.Size(x.Cluster)
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *StoreAction_Secret:
- s := proto.Size(x.Secret)
- n += proto.SizeVarint(7<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *StoreAction_Resource:
- s := proto.Size(x.Resource)
- n += proto.SizeVarint(8<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *StoreAction_Extension:
- s := proto.Size(x.Extension)
- n += proto.SizeVarint(9<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case *StoreAction_Config:
- s := proto.Size(x.Config)
- n += proto.SizeVarint(10<<3 | proto.WireBytes)
- n += proto.SizeVarint(uint64(s))
- n += s
- case nil:
- default:
- panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
- }
- return n
- }
- func init() {
- proto.RegisterType((*RaftMember)(nil), "docker.swarmkit.v1.RaftMember")
- proto.RegisterType((*JoinRequest)(nil), "docker.swarmkit.v1.JoinRequest")
- proto.RegisterType((*JoinResponse)(nil), "docker.swarmkit.v1.JoinResponse")
- proto.RegisterType((*LeaveRequest)(nil), "docker.swarmkit.v1.LeaveRequest")
- proto.RegisterType((*LeaveResponse)(nil), "docker.swarmkit.v1.LeaveResponse")
- proto.RegisterType((*ProcessRaftMessageRequest)(nil), "docker.swarmkit.v1.ProcessRaftMessageRequest")
- proto.RegisterType((*ProcessRaftMessageResponse)(nil), "docker.swarmkit.v1.ProcessRaftMessageResponse")
- proto.RegisterType((*ResolveAddressRequest)(nil), "docker.swarmkit.v1.ResolveAddressRequest")
- proto.RegisterType((*ResolveAddressResponse)(nil), "docker.swarmkit.v1.ResolveAddressResponse")
- proto.RegisterType((*InternalRaftRequest)(nil), "docker.swarmkit.v1.InternalRaftRequest")
- proto.RegisterType((*StoreAction)(nil), "docker.swarmkit.v1.StoreAction")
- proto.RegisterEnum("docker.swarmkit.v1.StoreActionKind", StoreActionKind_name, StoreActionKind_value)
- }
- type authenticatedWrapperRaftServer struct {
- local RaftServer
- authorize func(context.Context, []string) error
- }
- func NewAuthenticatedWrapperRaftServer(local RaftServer, authorize func(context.Context, []string) error) RaftServer {
- return &authenticatedWrapperRaftServer{
- local: local,
- authorize: authorize,
- }
- }
- func (p *authenticatedWrapperRaftServer) ProcessRaftMessage(ctx context.Context, r *ProcessRaftMessageRequest) (*ProcessRaftMessageResponse, error) {
- if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
- return nil, err
- }
- return p.local.ProcessRaftMessage(ctx, r)
- }
- func (p *authenticatedWrapperRaftServer) ResolveAddress(ctx context.Context, r *ResolveAddressRequest) (*ResolveAddressResponse, error) {
- if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
- return nil, err
- }
- return p.local.ResolveAddress(ctx, r)
- }
- type authenticatedWrapperRaftMembershipServer struct {
- local RaftMembershipServer
- authorize func(context.Context, []string) error
- }
- func NewAuthenticatedWrapperRaftMembershipServer(local RaftMembershipServer, authorize func(context.Context, []string) error) RaftMembershipServer {
- return &authenticatedWrapperRaftMembershipServer{
- local: local,
- authorize: authorize,
- }
- }
- func (p *authenticatedWrapperRaftMembershipServer) Join(ctx context.Context, r *JoinRequest) (*JoinResponse, error) {
- if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
- return nil, err
- }
- return p.local.Join(ctx, r)
- }
- func (p *authenticatedWrapperRaftMembershipServer) Leave(ctx context.Context, r *LeaveRequest) (*LeaveResponse, error) {
- if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
- return nil, err
- }
- return p.local.Leave(ctx, r)
- }
- func (m *RaftMember) Copy() *RaftMember {
- if m == nil {
- return nil
- }
- o := &RaftMember{}
- o.CopyFrom(m)
- return o
- }
- func (m *RaftMember) CopyFrom(src interface{}) {
- o := src.(*RaftMember)
- *m = *o
- github_com_docker_swarmkit_api_deepcopy.Copy(&m.Status, &o.Status)
- }
- func (m *JoinRequest) Copy() *JoinRequest {
- if m == nil {
- return nil
- }
- o := &JoinRequest{}
- o.CopyFrom(m)
- return o
- }
- func (m *JoinRequest) CopyFrom(src interface{}) {
- o := src.(*JoinRequest)
- *m = *o
- }
- func (m *JoinResponse) Copy() *JoinResponse {
- if m == nil {
- return nil
- }
- o := &JoinResponse{}
- o.CopyFrom(m)
- return o
- }
- func (m *JoinResponse) CopyFrom(src interface{}) {
- o := src.(*JoinResponse)
- *m = *o
- if o.Members != nil {
- m.Members = make([]*RaftMember, len(o.Members))
- for i := range m.Members {
- m.Members[i] = &RaftMember{}
- github_com_docker_swarmkit_api_deepcopy.Copy(m.Members[i], o.Members[i])
- }
- }
- if o.RemovedMembers != nil {
- m.RemovedMembers = make([]uint64, len(o.RemovedMembers))
- copy(m.RemovedMembers, o.RemovedMembers)
- }
- }
- func (m *LeaveRequest) Copy() *LeaveRequest {
- if m == nil {
- return nil
- }
- o := &LeaveRequest{}
- o.CopyFrom(m)
- return o
- }
- func (m *LeaveRequest) CopyFrom(src interface{}) {
- o := src.(*LeaveRequest)
- *m = *o
- if o.Node != nil {
- m.Node = &RaftMember{}
- github_com_docker_swarmkit_api_deepcopy.Copy(m.Node, o.Node)
- }
- }
- func (m *LeaveResponse) Copy() *LeaveResponse {
- if m == nil {
- return nil
- }
- o := &LeaveResponse{}
- o.CopyFrom(m)
- return o
- }
- func (m *LeaveResponse) CopyFrom(src interface{}) {}
- func (m *ProcessRaftMessageResponse) Copy() *ProcessRaftMessageResponse {
- if m == nil {
- return nil
- }
- o := &ProcessRaftMessageResponse{}
- o.CopyFrom(m)
- return o
- }
- func (m *ProcessRaftMessageResponse) CopyFrom(src interface{}) {}
- func (m *ResolveAddressRequest) Copy() *ResolveAddressRequest {
- if m == nil {
- return nil
- }
- o := &ResolveAddressRequest{}
- o.CopyFrom(m)
- return o
- }
- func (m *ResolveAddressRequest) CopyFrom(src interface{}) {
- o := src.(*ResolveAddressRequest)
- *m = *o
- }
- func (m *ResolveAddressResponse) Copy() *ResolveAddressResponse {
- if m == nil {
- return nil
- }
- o := &ResolveAddressResponse{}
- o.CopyFrom(m)
- return o
- }
- func (m *ResolveAddressResponse) CopyFrom(src interface{}) {
- o := src.(*ResolveAddressResponse)
- *m = *o
- }
- func (m *InternalRaftRequest) Copy() *InternalRaftRequest {
- if m == nil {
- return nil
- }
- o := &InternalRaftRequest{}
- o.CopyFrom(m)
- return o
- }
- func (m *InternalRaftRequest) CopyFrom(src interface{}) {
- o := src.(*InternalRaftRequest)
- *m = *o
- if o.Action != nil {
- m.Action = make([]StoreAction, len(o.Action))
- for i := range m.Action {
- github_com_docker_swarmkit_api_deepcopy.Copy(&m.Action[i], &o.Action[i])
- }
- }
- }
- func (m *StoreAction) Copy() *StoreAction {
- if m == nil {
- return nil
- }
- o := &StoreAction{}
- o.CopyFrom(m)
- return o
- }
- func (m *StoreAction) CopyFrom(src interface{}) {
- o := src.(*StoreAction)
- *m = *o
- if o.Target != nil {
- switch o.Target.(type) {
- case *StoreAction_Node:
- v := StoreAction_Node{
- Node: &Node{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Node, o.GetNode())
- m.Target = &v
- case *StoreAction_Service:
- v := StoreAction_Service{
- Service: &Service{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Service, o.GetService())
- m.Target = &v
- case *StoreAction_Task:
- v := StoreAction_Task{
- Task: &Task{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Task, o.GetTask())
- m.Target = &v
- case *StoreAction_Network:
- v := StoreAction_Network{
- Network: &Network{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Network, o.GetNetwork())
- m.Target = &v
- case *StoreAction_Cluster:
- v := StoreAction_Cluster{
- Cluster: &Cluster{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Cluster, o.GetCluster())
- m.Target = &v
- case *StoreAction_Secret:
- v := StoreAction_Secret{
- Secret: &Secret{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Secret, o.GetSecret())
- m.Target = &v
- case *StoreAction_Resource:
- v := StoreAction_Resource{
- Resource: &Resource{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Resource, o.GetResource())
- m.Target = &v
- case *StoreAction_Extension:
- v := StoreAction_Extension{
- Extension: &Extension{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Extension, o.GetExtension())
- m.Target = &v
- case *StoreAction_Config:
- v := StoreAction_Config{
- Config: &Config{},
- }
- github_com_docker_swarmkit_api_deepcopy.Copy(v.Config, o.GetConfig())
- m.Target = &v
- }
- }
- }
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConn
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion4
- // Client API for Raft service
- type RaftClient interface {
- // ProcessRaftMessage sends a raft message to be processed on a raft member, it is
- // called from the RaftMember willing to send a message to its destination ('To' field)
- ProcessRaftMessage(ctx context.Context, in *ProcessRaftMessageRequest, opts ...grpc.CallOption) (*ProcessRaftMessageResponse, error)
- // ResolveAddress returns the address where the node with the given ID can be reached.
- ResolveAddress(ctx context.Context, in *ResolveAddressRequest, opts ...grpc.CallOption) (*ResolveAddressResponse, error)
- }
- type raftClient struct {
- cc *grpc.ClientConn
- }
- func NewRaftClient(cc *grpc.ClientConn) RaftClient {
- return &raftClient{cc}
- }
- func (c *raftClient) ProcessRaftMessage(ctx context.Context, in *ProcessRaftMessageRequest, opts ...grpc.CallOption) (*ProcessRaftMessageResponse, error) {
- out := new(ProcessRaftMessageResponse)
- err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Raft/ProcessRaftMessage", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *raftClient) ResolveAddress(ctx context.Context, in *ResolveAddressRequest, opts ...grpc.CallOption) (*ResolveAddressResponse, error) {
- out := new(ResolveAddressResponse)
- err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Raft/ResolveAddress", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for Raft service
- type RaftServer interface {
- // ProcessRaftMessage sends a raft message to be processed on a raft member, it is
- // called from the RaftMember willing to send a message to its destination ('To' field)
- ProcessRaftMessage(context.Context, *ProcessRaftMessageRequest) (*ProcessRaftMessageResponse, error)
- // ResolveAddress returns the address where the node with the given ID can be reached.
- ResolveAddress(context.Context, *ResolveAddressRequest) (*ResolveAddressResponse, error)
- }
- func RegisterRaftServer(s *grpc.Server, srv RaftServer) {
- s.RegisterService(&_Raft_serviceDesc, srv)
- }
- func _Raft_ProcessRaftMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ProcessRaftMessageRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(RaftServer).ProcessRaftMessage(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/docker.swarmkit.v1.Raft/ProcessRaftMessage",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(RaftServer).ProcessRaftMessage(ctx, req.(*ProcessRaftMessageRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Raft_ResolveAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ResolveAddressRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(RaftServer).ResolveAddress(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/docker.swarmkit.v1.Raft/ResolveAddress",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(RaftServer).ResolveAddress(ctx, req.(*ResolveAddressRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _Raft_serviceDesc = grpc.ServiceDesc{
- ServiceName: "docker.swarmkit.v1.Raft",
- HandlerType: (*RaftServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "ProcessRaftMessage",
- Handler: _Raft_ProcessRaftMessage_Handler,
- },
- {
- MethodName: "ResolveAddress",
- Handler: _Raft_ResolveAddress_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "raft.proto",
- }
- // Client API for RaftMembership service
- type RaftMembershipClient interface {
- // Join adds a RaftMember to the raft cluster.
- Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*JoinResponse, error)
- // Leave removes a RaftMember from the raft cluster.
- Leave(ctx context.Context, in *LeaveRequest, opts ...grpc.CallOption) (*LeaveResponse, error)
- }
- type raftMembershipClient struct {
- cc *grpc.ClientConn
- }
- func NewRaftMembershipClient(cc *grpc.ClientConn) RaftMembershipClient {
- return &raftMembershipClient{cc}
- }
- func (c *raftMembershipClient) Join(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*JoinResponse, error) {
- out := new(JoinResponse)
- err := grpc.Invoke(ctx, "/docker.swarmkit.v1.RaftMembership/Join", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *raftMembershipClient) Leave(ctx context.Context, in *LeaveRequest, opts ...grpc.CallOption) (*LeaveResponse, error) {
- out := new(LeaveResponse)
- err := grpc.Invoke(ctx, "/docker.swarmkit.v1.RaftMembership/Leave", in, out, c.cc, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for RaftMembership service
- type RaftMembershipServer interface {
- // Join adds a RaftMember to the raft cluster.
- Join(context.Context, *JoinRequest) (*JoinResponse, error)
- // Leave removes a RaftMember from the raft cluster.
- Leave(context.Context, *LeaveRequest) (*LeaveResponse, error)
- }
- func RegisterRaftMembershipServer(s *grpc.Server, srv RaftMembershipServer) {
- s.RegisterService(&_RaftMembership_serviceDesc, srv)
- }
- func _RaftMembership_Join_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(JoinRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(RaftMembershipServer).Join(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/docker.swarmkit.v1.RaftMembership/Join",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(RaftMembershipServer).Join(ctx, req.(*JoinRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _RaftMembership_Leave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(LeaveRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(RaftMembershipServer).Leave(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/docker.swarmkit.v1.RaftMembership/Leave",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(RaftMembershipServer).Leave(ctx, req.(*LeaveRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _RaftMembership_serviceDesc = grpc.ServiceDesc{
- ServiceName: "docker.swarmkit.v1.RaftMembership",
- HandlerType: (*RaftMembershipServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "Join",
- Handler: _RaftMembership_Join_Handler,
- },
- {
- MethodName: "Leave",
- Handler: _RaftMembership_Leave_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "raft.proto",
- }
- func (m *RaftMember) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *RaftMember) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.RaftID != 0 {
- dAtA[i] = 0x8
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.RaftID))
- }
- if len(m.NodeID) > 0 {
- dAtA[i] = 0x12
- i++
- i = encodeVarintRaft(dAtA, i, uint64(len(m.NodeID)))
- i += copy(dAtA[i:], m.NodeID)
- }
- if len(m.Addr) > 0 {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintRaft(dAtA, i, uint64(len(m.Addr)))
- i += copy(dAtA[i:], m.Addr)
- }
- dAtA[i] = 0x22
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Status.Size()))
- n1, err := m.Status.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- return i, nil
- }
- func (m *JoinRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *JoinRequest) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Addr) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintRaft(dAtA, i, uint64(len(m.Addr)))
- i += copy(dAtA[i:], m.Addr)
- }
- return i, nil
- }
- func (m *JoinResponse) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *JoinResponse) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.RaftID != 0 {
- dAtA[i] = 0x8
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.RaftID))
- }
- if len(m.Members) > 0 {
- for _, msg := range m.Members {
- dAtA[i] = 0x12
- i++
- i = encodeVarintRaft(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- if len(m.RemovedMembers) > 0 {
- for _, num := range m.RemovedMembers {
- dAtA[i] = 0x18
- i++
- i = encodeVarintRaft(dAtA, i, uint64(num))
- }
- }
- return i, nil
- }
- func (m *LeaveRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *LeaveRequest) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Node != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Node.Size()))
- n2, err := m.Node.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- return i, nil
- }
- func (m *LeaveResponse) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *LeaveResponse) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- return i, nil
- }
- func (m *ProcessRaftMessageRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *ProcessRaftMessageRequest) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Message != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Message.Size()))
- n3, err := m.Message.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- }
- return i, nil
- }
- func (m *ProcessRaftMessageResponse) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *ProcessRaftMessageResponse) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- return i, nil
- }
- func (m *ResolveAddressRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *ResolveAddressRequest) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.RaftID != 0 {
- dAtA[i] = 0x8
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.RaftID))
- }
- return i, nil
- }
- func (m *ResolveAddressResponse) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *ResolveAddressResponse) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Addr) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintRaft(dAtA, i, uint64(len(m.Addr)))
- i += copy(dAtA[i:], m.Addr)
- }
- return i, nil
- }
- func (m *InternalRaftRequest) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *InternalRaftRequest) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.ID != 0 {
- dAtA[i] = 0x8
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.ID))
- }
- if len(m.Action) > 0 {
- for _, msg := range m.Action {
- dAtA[i] = 0x12
- i++
- i = encodeVarintRaft(dAtA, i, uint64(msg.Size()))
- n, err := msg.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n
- }
- }
- return i, nil
- }
- func (m *StoreAction) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *StoreAction) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Action != 0 {
- dAtA[i] = 0x8
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Action))
- }
- if m.Target != nil {
- nn4, err := m.Target.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += nn4
- }
- return i, nil
- }
- func (m *StoreAction_Node) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Node != nil {
- dAtA[i] = 0x12
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Node.Size()))
- n5, err := m.Node.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n5
- }
- return i, nil
- }
- func (m *StoreAction_Service) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Service != nil {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Service.Size()))
- n6, err := m.Service.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n6
- }
- return i, nil
- }
- func (m *StoreAction_Task) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Task != nil {
- dAtA[i] = 0x22
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Task.Size()))
- n7, err := m.Task.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n7
- }
- return i, nil
- }
- func (m *StoreAction_Network) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Network != nil {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Network.Size()))
- n8, err := m.Network.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n8
- }
- return i, nil
- }
- func (m *StoreAction_Cluster) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Cluster != nil {
- dAtA[i] = 0x32
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Cluster.Size()))
- n9, err := m.Cluster.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n9
- }
- return i, nil
- }
- func (m *StoreAction_Secret) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Secret != nil {
- dAtA[i] = 0x3a
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Secret.Size()))
- n10, err := m.Secret.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n10
- }
- return i, nil
- }
- func (m *StoreAction_Resource) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Resource != nil {
- dAtA[i] = 0x42
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Resource.Size()))
- n11, err := m.Resource.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n11
- }
- return i, nil
- }
- func (m *StoreAction_Extension) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Extension != nil {
- dAtA[i] = 0x4a
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Extension.Size()))
- n12, err := m.Extension.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n12
- }
- return i, nil
- }
- func (m *StoreAction_Config) MarshalTo(dAtA []byte) (int, error) {
- i := 0
- if m.Config != nil {
- dAtA[i] = 0x52
- i++
- i = encodeVarintRaft(dAtA, i, uint64(m.Config.Size()))
- n13, err := m.Config.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n13
- }
- return i, nil
- }
- func encodeFixed64Raft(dAtA []byte, offset int, v uint64) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- dAtA[offset+4] = uint8(v >> 32)
- dAtA[offset+5] = uint8(v >> 40)
- dAtA[offset+6] = uint8(v >> 48)
- dAtA[offset+7] = uint8(v >> 56)
- return offset + 8
- }
- func encodeFixed32Raft(dAtA []byte, offset int, v uint32) int {
- dAtA[offset] = uint8(v)
- dAtA[offset+1] = uint8(v >> 8)
- dAtA[offset+2] = uint8(v >> 16)
- dAtA[offset+3] = uint8(v >> 24)
- return offset + 4
- }
- func encodeVarintRaft(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
- }
- type raftProxyRaftServer struct {
- local RaftServer
- connSelector raftselector.ConnProvider
- localCtxMods, remoteCtxMods []func(context.Context) (context.Context, error)
- }
- func NewRaftProxyRaftServer(local RaftServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) RaftServer {
- redirectChecker := func(ctx context.Context) (context.Context, error) {
- s, ok := transport.StreamFromContext(ctx)
- if !ok {
- return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context")
- }
- addr := s.ServerTransport().RemoteAddr().String()
- md, ok := metadata.FromContext(ctx)
- if ok && len(md["redirect"]) != 0 {
- return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"])
- }
- if !ok {
- md = metadata.New(map[string]string{})
- }
- md["redirect"] = append(md["redirect"], addr)
- return metadata.NewContext(ctx, md), nil
- }
- remoteMods := []func(context.Context) (context.Context, error){redirectChecker}
- remoteMods = append(remoteMods, remoteCtxMod)
- var localMods []func(context.Context) (context.Context, error)
- if localCtxMod != nil {
- localMods = []func(context.Context) (context.Context, error){localCtxMod}
- }
- return &raftProxyRaftServer{
- local: local,
- connSelector: connSelector,
- localCtxMods: localMods,
- remoteCtxMods: remoteMods,
- }
- }
- func (p *raftProxyRaftServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) {
- var err error
- for _, mod := range ctxMods {
- ctx, err = mod(ctx)
- if err != nil {
- return ctx, err
- }
- }
- return ctx, nil
- }
- func (p *raftProxyRaftServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
- ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
- defer ticker.Stop()
- for {
- select {
- case <-ticker.C:
- conn, err := p.connSelector.LeaderConn(ctx)
- if err != nil {
- return nil, err
- }
- client := NewHealthClient(conn)
- resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"})
- if err != nil || resp.Status != HealthCheckResponse_SERVING {
- continue
- }
- return conn, nil
- case <-ctx.Done():
- return nil, ctx.Err()
- }
- }
- }
- func (p *raftProxyRaftServer) ProcessRaftMessage(ctx context.Context, r *ProcessRaftMessageRequest) (*ProcessRaftMessageResponse, error) {
- conn, err := p.connSelector.LeaderConn(ctx)
- if err != nil {
- if err == raftselector.ErrIsLeader {
- ctx, err = p.runCtxMods(ctx, p.localCtxMods)
- if err != nil {
- return nil, err
- }
- return p.local.ProcessRaftMessage(ctx, r)
- }
- return nil, err
- }
- modCtx, err := p.runCtxMods(ctx, p.remoteCtxMods)
- if err != nil {
- return nil, err
- }
- resp, err := NewRaftClient(conn).ProcessRaftMessage(modCtx, r)
- if err != nil {
- if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
- return resp, err
- }
- conn, err := p.pollNewLeaderConn(ctx)
- if err != nil {
- if err == raftselector.ErrIsLeader {
- return p.local.ProcessRaftMessage(ctx, r)
- }
- return nil, err
- }
- return NewRaftClient(conn).ProcessRaftMessage(modCtx, r)
- }
- return resp, err
- }
- func (p *raftProxyRaftServer) ResolveAddress(ctx context.Context, r *ResolveAddressRequest) (*ResolveAddressResponse, error) {
- conn, err := p.connSelector.LeaderConn(ctx)
- if err != nil {
- if err == raftselector.ErrIsLeader {
- ctx, err = p.runCtxMods(ctx, p.localCtxMods)
- if err != nil {
- return nil, err
- }
- return p.local.ResolveAddress(ctx, r)
- }
- return nil, err
- }
- modCtx, err := p.runCtxMods(ctx, p.remoteCtxMods)
- if err != nil {
- return nil, err
- }
- resp, err := NewRaftClient(conn).ResolveAddress(modCtx, r)
- if err != nil {
- if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
- return resp, err
- }
- conn, err := p.pollNewLeaderConn(ctx)
- if err != nil {
- if err == raftselector.ErrIsLeader {
- return p.local.ResolveAddress(ctx, r)
- }
- return nil, err
- }
- return NewRaftClient(conn).ResolveAddress(modCtx, r)
- }
- return resp, err
- }
- type raftProxyRaftMembershipServer struct {
- local RaftMembershipServer
- connSelector raftselector.ConnProvider
- localCtxMods, remoteCtxMods []func(context.Context) (context.Context, error)
- }
- func NewRaftProxyRaftMembershipServer(local RaftMembershipServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) RaftMembershipServer {
- redirectChecker := func(ctx context.Context) (context.Context, error) {
- s, ok := transport.StreamFromContext(ctx)
- if !ok {
- return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context")
- }
- addr := s.ServerTransport().RemoteAddr().String()
- md, ok := metadata.FromContext(ctx)
- if ok && len(md["redirect"]) != 0 {
- return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"])
- }
- if !ok {
- md = metadata.New(map[string]string{})
- }
- md["redirect"] = append(md["redirect"], addr)
- return metadata.NewContext(ctx, md), nil
- }
- remoteMods := []func(context.Context) (context.Context, error){redirectChecker}
- remoteMods = append(remoteMods, remoteCtxMod)
- var localMods []func(context.Context) (context.Context, error)
- if localCtxMod != nil {
- localMods = []func(context.Context) (context.Context, error){localCtxMod}
- }
- return &raftProxyRaftMembershipServer{
- local: local,
- connSelector: connSelector,
- localCtxMods: localMods,
- remoteCtxMods: remoteMods,
- }
- }
- func (p *raftProxyRaftMembershipServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) {
- var err error
- for _, mod := range ctxMods {
- ctx, err = mod(ctx)
- if err != nil {
- return ctx, err
- }
- }
- return ctx, nil
- }
- func (p *raftProxyRaftMembershipServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
- ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
- defer ticker.Stop()
- for {
- select {
- case <-ticker.C:
- conn, err := p.connSelector.LeaderConn(ctx)
- if err != nil {
- return nil, err
- }
- client := NewHealthClient(conn)
- resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"})
- if err != nil || resp.Status != HealthCheckResponse_SERVING {
- continue
- }
- return conn, nil
- case <-ctx.Done():
- return nil, ctx.Err()
- }
- }
- }
- func (p *raftProxyRaftMembershipServer) Join(ctx context.Context, r *JoinRequest) (*JoinResponse, error) {
- conn, err := p.connSelector.LeaderConn(ctx)
- if err != nil {
- if err == raftselector.ErrIsLeader {
- ctx, err = p.runCtxMods(ctx, p.localCtxMods)
- if err != nil {
- return nil, err
- }
- return p.local.Join(ctx, r)
- }
- return nil, err
- }
- modCtx, err := p.runCtxMods(ctx, p.remoteCtxMods)
- if err != nil {
- return nil, err
- }
- resp, err := NewRaftMembershipClient(conn).Join(modCtx, r)
- if err != nil {
- if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
- return resp, err
- }
- conn, err := p.pollNewLeaderConn(ctx)
- if err != nil {
- if err == raftselector.ErrIsLeader {
- return p.local.Join(ctx, r)
- }
- return nil, err
- }
- return NewRaftMembershipClient(conn).Join(modCtx, r)
- }
- return resp, err
- }
- func (p *raftProxyRaftMembershipServer) Leave(ctx context.Context, r *LeaveRequest) (*LeaveResponse, error) {
- conn, err := p.connSelector.LeaderConn(ctx)
- if err != nil {
- if err == raftselector.ErrIsLeader {
- ctx, err = p.runCtxMods(ctx, p.localCtxMods)
- if err != nil {
- return nil, err
- }
- return p.local.Leave(ctx, r)
- }
- return nil, err
- }
- modCtx, err := p.runCtxMods(ctx, p.remoteCtxMods)
- if err != nil {
- return nil, err
- }
- resp, err := NewRaftMembershipClient(conn).Leave(modCtx, r)
- if err != nil {
- if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
- return resp, err
- }
- conn, err := p.pollNewLeaderConn(ctx)
- if err != nil {
- if err == raftselector.ErrIsLeader {
- return p.local.Leave(ctx, r)
- }
- return nil, err
- }
- return NewRaftMembershipClient(conn).Leave(modCtx, r)
- }
- return resp, err
- }
- func (m *RaftMember) Size() (n int) {
- var l int
- _ = l
- if m.RaftID != 0 {
- n += 1 + sovRaft(uint64(m.RaftID))
- }
- l = len(m.NodeID)
- if l > 0 {
- n += 1 + l + sovRaft(uint64(l))
- }
- l = len(m.Addr)
- if l > 0 {
- n += 1 + l + sovRaft(uint64(l))
- }
- l = m.Status.Size()
- n += 1 + l + sovRaft(uint64(l))
- return n
- }
- func (m *JoinRequest) Size() (n int) {
- var l int
- _ = l
- l = len(m.Addr)
- if l > 0 {
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *JoinResponse) Size() (n int) {
- var l int
- _ = l
- if m.RaftID != 0 {
- n += 1 + sovRaft(uint64(m.RaftID))
- }
- if len(m.Members) > 0 {
- for _, e := range m.Members {
- l = e.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- }
- if len(m.RemovedMembers) > 0 {
- for _, e := range m.RemovedMembers {
- n += 1 + sovRaft(uint64(e))
- }
- }
- return n
- }
- func (m *LeaveRequest) Size() (n int) {
- var l int
- _ = l
- if m.Node != nil {
- l = m.Node.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *LeaveResponse) Size() (n int) {
- var l int
- _ = l
- return n
- }
- func (m *ProcessRaftMessageRequest) Size() (n int) {
- var l int
- _ = l
- if m.Message != nil {
- l = m.Message.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *ProcessRaftMessageResponse) Size() (n int) {
- var l int
- _ = l
- return n
- }
- func (m *ResolveAddressRequest) Size() (n int) {
- var l int
- _ = l
- if m.RaftID != 0 {
- n += 1 + sovRaft(uint64(m.RaftID))
- }
- return n
- }
- func (m *ResolveAddressResponse) Size() (n int) {
- var l int
- _ = l
- l = len(m.Addr)
- if l > 0 {
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *InternalRaftRequest) Size() (n int) {
- var l int
- _ = l
- if m.ID != 0 {
- n += 1 + sovRaft(uint64(m.ID))
- }
- if len(m.Action) > 0 {
- for _, e := range m.Action {
- l = e.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- }
- return n
- }
- func (m *StoreAction) Size() (n int) {
- var l int
- _ = l
- if m.Action != 0 {
- n += 1 + sovRaft(uint64(m.Action))
- }
- if m.Target != nil {
- n += m.Target.Size()
- }
- return n
- }
- func (m *StoreAction_Node) Size() (n int) {
- var l int
- _ = l
- if m.Node != nil {
- l = m.Node.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *StoreAction_Service) Size() (n int) {
- var l int
- _ = l
- if m.Service != nil {
- l = m.Service.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *StoreAction_Task) Size() (n int) {
- var l int
- _ = l
- if m.Task != nil {
- l = m.Task.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *StoreAction_Network) Size() (n int) {
- var l int
- _ = l
- if m.Network != nil {
- l = m.Network.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *StoreAction_Cluster) Size() (n int) {
- var l int
- _ = l
- if m.Cluster != nil {
- l = m.Cluster.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *StoreAction_Secret) Size() (n int) {
- var l int
- _ = l
- if m.Secret != nil {
- l = m.Secret.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *StoreAction_Resource) Size() (n int) {
- var l int
- _ = l
- if m.Resource != nil {
- l = m.Resource.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *StoreAction_Extension) Size() (n int) {
- var l int
- _ = l
- if m.Extension != nil {
- l = m.Extension.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func (m *StoreAction_Config) Size() (n int) {
- var l int
- _ = l
- if m.Config != nil {
- l = m.Config.Size()
- n += 1 + l + sovRaft(uint64(l))
- }
- return n
- }
- func sovRaft(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
- }
- func sozRaft(x uint64) (n int) {
- return sovRaft(uint64((x << 1) ^ uint64((int64(x) >> 63))))
- }
- func (this *RaftMember) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&RaftMember{`,
- `RaftID:` + fmt.Sprintf("%v", this.RaftID) + `,`,
- `NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
- `Addr:` + fmt.Sprintf("%v", this.Addr) + `,`,
- `Status:` + strings.Replace(strings.Replace(this.Status.String(), "RaftMemberStatus", "RaftMemberStatus", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *JoinRequest) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JoinRequest{`,
- `Addr:` + fmt.Sprintf("%v", this.Addr) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *JoinResponse) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&JoinResponse{`,
- `RaftID:` + fmt.Sprintf("%v", this.RaftID) + `,`,
- `Members:` + strings.Replace(fmt.Sprintf("%v", this.Members), "RaftMember", "RaftMember", 1) + `,`,
- `RemovedMembers:` + fmt.Sprintf("%v", this.RemovedMembers) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *LeaveRequest) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&LeaveRequest{`,
- `Node:` + strings.Replace(fmt.Sprintf("%v", this.Node), "RaftMember", "RaftMember", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *LeaveResponse) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&LeaveResponse{`,
- `}`,
- }, "")
- return s
- }
- func (this *ProcessRaftMessageRequest) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ProcessRaftMessageRequest{`,
- `Message:` + strings.Replace(fmt.Sprintf("%v", this.Message), "Message", "raftpb.Message", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *ProcessRaftMessageResponse) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ProcessRaftMessageResponse{`,
- `}`,
- }, "")
- return s
- }
- func (this *ResolveAddressRequest) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResolveAddressRequest{`,
- `RaftID:` + fmt.Sprintf("%v", this.RaftID) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *ResolveAddressResponse) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&ResolveAddressResponse{`,
- `Addr:` + fmt.Sprintf("%v", this.Addr) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *InternalRaftRequest) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&InternalRaftRequest{`,
- `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Action:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Action), "StoreAction", "StoreAction", 1), `&`, ``, 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction{`,
- `Action:` + fmt.Sprintf("%v", this.Action) + `,`,
- `Target:` + fmt.Sprintf("%v", this.Target) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Node) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Node{`,
- `Node:` + strings.Replace(fmt.Sprintf("%v", this.Node), "Node", "Node", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Service) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Service{`,
- `Service:` + strings.Replace(fmt.Sprintf("%v", this.Service), "Service", "Service", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Task) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Task{`,
- `Task:` + strings.Replace(fmt.Sprintf("%v", this.Task), "Task", "Task", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Network) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Network{`,
- `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "Network", "Network", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Cluster) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Cluster{`,
- `Cluster:` + strings.Replace(fmt.Sprintf("%v", this.Cluster), "Cluster", "Cluster", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Secret) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Secret{`,
- `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Resource) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Resource{`,
- `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "Resource", "Resource", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Extension) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Extension{`,
- `Extension:` + strings.Replace(fmt.Sprintf("%v", this.Extension), "Extension", "Extension", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func (this *StoreAction_Config) String() string {
- if this == nil {
- return "nil"
- }
- s := strings.Join([]string{`&StoreAction_Config{`,
- `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "Config", "Config", 1) + `,`,
- `}`,
- }, "")
- return s
- }
- func valueToStringRaft(v interface{}) string {
- rv := reflect.ValueOf(v)
- if rv.IsNil() {
- return "nil"
- }
- pv := reflect.Indirect(rv).Interface()
- return fmt.Sprintf("*%v", pv)
- }
- func (m *RaftMember) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: RaftMember: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: RaftMember: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RaftID", wireType)
- }
- m.RaftID = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.RaftID |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.NodeID = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Addr = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *JoinRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JoinRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JoinRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Addr = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *JoinResponse) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: JoinResponse: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: JoinResponse: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RaftID", wireType)
- }
- m.RaftID = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.RaftID |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Members = append(m.Members, &RaftMember{})
- if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType == 0 {
- var v uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RemovedMembers = append(m.RemovedMembers, v)
- } else if wireType == 2 {
- var packedLen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- packedLen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if packedLen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + packedLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- for iNdEx < postIndex {
- var v uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.RemovedMembers = append(m.RemovedMembers, v)
- }
- } else {
- return fmt.Errorf("proto: wrong wireType = %d for field RemovedMembers", wireType)
- }
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *LeaveRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: LeaveRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: LeaveRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Node == nil {
- m.Node = &RaftMember{}
- }
- if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *LeaveResponse) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: LeaveResponse: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: LeaveResponse: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *ProcessRaftMessageRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ProcessRaftMessageRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ProcessRaftMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Message == nil {
- m.Message = &raftpb.Message{}
- }
- if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *ProcessRaftMessageResponse) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ProcessRaftMessageResponse: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ProcessRaftMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *ResolveAddressRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResolveAddressRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResolveAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field RaftID", wireType)
- }
- m.RaftID = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.RaftID |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *ResolveAddressResponse) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResolveAddressResponse: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResolveAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Addr = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *InternalRaftRequest) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: InternalRaftRequest: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: InternalRaftRequest: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
- }
- m.ID = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ID |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Action = append(m.Action, StoreAction{})
- if err := m.Action[len(m.Action)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *StoreAction) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: StoreAction: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: StoreAction: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
- }
- m.Action = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Action |= (StoreActionKind(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Node{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Node{v}
- iNdEx = postIndex
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Service{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Service{v}
- iNdEx = postIndex
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Task{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Task{v}
- iNdEx = postIndex
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Network{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Network{v}
- iNdEx = postIndex
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Cluster{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Cluster{v}
- iNdEx = postIndex
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Secret{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Secret{v}
- iNdEx = postIndex
- case 8:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Resource{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Resource{v}
- iNdEx = postIndex
- case 9:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Extension{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Extension{v}
- iNdEx = postIndex
- case 10:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthRaft
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- v := &Config{}
- if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- m.Target = &StoreAction_Config{v}
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipRaft(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthRaft
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func skipRaft(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthRaft
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowRaft
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipRaft(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
- }
- var (
- ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowRaft = fmt.Errorf("proto: integer overflow")
- )
- func init() { proto.RegisterFile("raft.proto", fileDescriptorRaft) }
- var fileDescriptorRaft = []byte{
- // 953 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x96, 0x4d, 0x6f, 0x1b, 0x45,
- 0x18, 0xc7, 0x77, 0xd7, 0x5b, 0x27, 0x79, 0xdc, 0xbc, 0x68, 0x42, 0xc2, 0x76, 0x29, 0x8e, 0xbb,
- 0x45, 0xc2, 0x2d, 0x64, 0x2d, 0x0c, 0x12, 0xa8, 0xd0, 0x43, 0xec, 0x58, 0xb2, 0x69, 0xeb, 0x54,
- 0x9b, 0x04, 0x7a, 0x0b, 0xeb, 0xdd, 0x89, 0xbb, 0xd8, 0xde, 0x31, 0x33, 0x63, 0x07, 0x2e, 0xa8,
- 0x47, 0x94, 0x2b, 0x07, 0x10, 0x52, 0x4f, 0x70, 0xee, 0x07, 0xe0, 0x03, 0xa0, 0x88, 0x13, 0x37,
- 0x38, 0x45, 0xd4, 0x1f, 0x00, 0xbe, 0x02, 0x9a, 0xd9, 0x5d, 0x3b, 0x38, 0x6b, 0x37, 0x17, 0x7b,
- 0x3c, 0xf3, 0xfb, 0x3f, 0xff, 0x79, 0xe6, 0xe5, 0x19, 0x03, 0x50, 0xf7, 0x98, 0xdb, 0x7d, 0x4a,
- 0x38, 0x41, 0xc8, 0x27, 0x5e, 0x07, 0x53, 0x9b, 0x9d, 0xb8, 0xb4, 0xd7, 0x09, 0xb8, 0x3d, 0x7c,
- 0xcf, 0x5c, 0x26, 0xad, 0x2f, 0xb1, 0xc7, 0x59, 0x84, 0x98, 0x39, 0xfe, 0x4d, 0x1f, 0x27, 0x3f,
- 0xb6, 0xdb, 0x01, 0x7f, 0x3a, 0x68, 0xd9, 0x1e, 0xe9, 0x95, 0x3c, 0x42, 0x31, 0x61, 0x25, 0xcc,
- 0x3d, 0xbf, 0x24, 0x42, 0xca, 0x8f, 0x7e, 0xab, 0x34, 0x09, 0x6f, 0xbe, 0xd6, 0x26, 0x6d, 0x22,
- 0x9b, 0x25, 0xd1, 0x8a, 0x7b, 0xd7, 0xfb, 0xdd, 0x41, 0x3b, 0x08, 0x4b, 0xd1, 0x57, 0xd4, 0x69,
- 0xbd, 0x50, 0x01, 0x1c, 0xf7, 0x98, 0x3f, 0xc2, 0xbd, 0x16, 0xa6, 0xe8, 0x36, 0x2c, 0x88, 0x38,
- 0x47, 0x81, 0x6f, 0xa8, 0x05, 0xb5, 0xa8, 0x57, 0x60, 0x74, 0xbe, 0x95, 0x15, 0x40, 0x63, 0xd7,
- 0xc9, 0x8a, 0xa1, 0x86, 0x2f, 0xa0, 0x90, 0xf8, 0x58, 0x40, 0x5a, 0x41, 0x2d, 0x2e, 0x45, 0x50,
- 0x93, 0xf8, 0x58, 0x40, 0x62, 0xa8, 0xe1, 0x23, 0x04, 0xba, 0xeb, 0xfb, 0xd4, 0xc8, 0x08, 0xc2,
- 0x91, 0x6d, 0x54, 0x81, 0x2c, 0xe3, 0x2e, 0x1f, 0x30, 0x43, 0x2f, 0xa8, 0xc5, 0x5c, 0xf9, 0x2d,
- 0xfb, 0xf2, 0x3a, 0xd8, 0x93, 0xd9, 0xec, 0x4b, 0xb6, 0xa2, 0x9f, 0x9d, 0x6f, 0x29, 0x4e, 0xac,
- 0xb4, 0x6e, 0x41, 0xee, 0x53, 0x12, 0x84, 0x0e, 0xfe, 0x6a, 0x80, 0x19, 0x1f, 0xdb, 0xa8, 0x13,
- 0x1b, 0xeb, 0x27, 0x15, 0xae, 0x47, 0x0c, 0xeb, 0x93, 0x90, 0xe1, 0xab, 0x65, 0xf5, 0x11, 0x2c,
- 0xf4, 0xa4, 0x2d, 0x33, 0xb4, 0x42, 0xa6, 0x98, 0x2b, 0xe7, 0xe7, 0xcf, 0xce, 0x49, 0x70, 0xf4,
- 0x0e, 0xac, 0x52, 0xdc, 0x23, 0x43, 0xec, 0x1f, 0x25, 0x11, 0x32, 0x85, 0x4c, 0x51, 0xaf, 0x68,
- 0x6b, 0x8a, 0xb3, 0x12, 0x0f, 0x45, 0x22, 0x66, 0x55, 0xe0, 0xfa, 0x43, 0xec, 0x0e, 0x71, 0x92,
- 0x40, 0x19, 0x74, 0xb1, 0x62, 0x72, 0x62, 0xaf, 0xf6, 0x94, 0xac, 0xb5, 0x0a, 0xcb, 0x71, 0x8c,
- 0x28, 0x41, 0xeb, 0x21, 0xdc, 0x78, 0x4c, 0x89, 0x87, 0x19, 0x8b, 0x58, 0xc6, 0xdc, 0xf6, 0xd8,
- 0xe1, 0x8e, 0x48, 0x4c, 0xf6, 0xc4, 0x26, 0xab, 0x76, 0x74, 0x64, 0xec, 0x04, 0x4c, 0xc6, 0xef,
- 0xe9, 0xcf, 0x7e, 0xb0, 0x14, 0xeb, 0x26, 0x98, 0x69, 0xd1, 0x62, 0xaf, 0x4f, 0x60, 0xc3, 0xc1,
- 0x8c, 0x74, 0x87, 0x78, 0xc7, 0xf7, 0xa9, 0x80, 0x62, 0x9f, 0xab, 0xac, 0xb2, 0xf5, 0x2e, 0x6c,
- 0x4e, 0xab, 0xe3, 0x4d, 0x4a, 0xdb, 0xc9, 0x2e, 0xac, 0x37, 0x42, 0x8e, 0x69, 0xe8, 0x76, 0x45,
- 0x9c, 0xc4, 0x69, 0x13, 0xb4, 0xb1, 0x49, 0x76, 0x74, 0xbe, 0xa5, 0x35, 0x76, 0x1d, 0x2d, 0xf0,
- 0xd1, 0x7d, 0xc8, 0xba, 0x1e, 0x0f, 0x48, 0x18, 0xef, 0xe0, 0x56, 0xda, 0x6a, 0xee, 0x73, 0x42,
- 0xf1, 0x8e, 0xc4, 0x92, 0xa3, 0x15, 0x89, 0xac, 0xdf, 0x74, 0xc8, 0x5d, 0x18, 0x45, 0x1f, 0x8f,
- 0xc3, 0x09, 0xab, 0x95, 0xf2, 0xed, 0x57, 0x84, 0x7b, 0x10, 0x84, 0x7e, 0x12, 0x0c, 0xd9, 0xf1,
- 0xbe, 0x6a, 0x72, 0xc9, 0x8d, 0x34, 0xa9, 0xb8, 0x31, 0x75, 0x25, 0xda, 0x53, 0xf4, 0x21, 0x2c,
- 0x30, 0x4c, 0x87, 0x81, 0x87, 0xe5, 0x95, 0xc9, 0x95, 0xdf, 0x48, 0x75, 0x8b, 0x90, 0xba, 0xe2,
- 0x24, 0xb4, 0x30, 0xe2, 0x2e, 0xeb, 0xc4, 0x57, 0x2a, 0xd5, 0xe8, 0xc0, 0x65, 0x1d, 0x61, 0x24,
- 0x38, 0x61, 0x14, 0x62, 0x7e, 0x42, 0x68, 0xc7, 0xb8, 0x36, 0xdb, 0xa8, 0x19, 0x21, 0xc2, 0x28,
- 0xa6, 0x85, 0xd0, 0xeb, 0x0e, 0x18, 0xc7, 0xd4, 0xc8, 0xce, 0x16, 0x56, 0x23, 0x44, 0x08, 0x63,
- 0x1a, 0x7d, 0x00, 0x59, 0x86, 0x3d, 0x8a, 0xb9, 0xb1, 0x20, 0x75, 0x66, 0x7a, 0x66, 0x82, 0xa8,
- 0x8b, 0x8b, 0x2e, 0x5b, 0xe8, 0x1e, 0x2c, 0x52, 0xcc, 0xc8, 0x80, 0x7a, 0xd8, 0x58, 0x94, 0xba,
- 0x9b, 0xa9, 0x97, 0x23, 0x66, 0xea, 0x8a, 0x33, 0xe6, 0xd1, 0x7d, 0x58, 0xc2, 0x5f, 0x73, 0x1c,
- 0x32, 0xb1, 0x79, 0x4b, 0x52, 0xfc, 0x66, 0x9a, 0xb8, 0x96, 0x40, 0x75, 0xc5, 0x99, 0x28, 0xc4,
- 0x84, 0x3d, 0x12, 0x1e, 0x07, 0x6d, 0x03, 0x66, 0x4f, 0xb8, 0x2a, 0x09, 0x31, 0xe1, 0x88, 0xad,
- 0x2c, 0x42, 0x96, 0xbb, 0xb4, 0x8d, 0xf9, 0xdd, 0x7f, 0x55, 0x58, 0x9d, 0x3a, 0x17, 0xe8, 0x6d,
- 0x58, 0x38, 0x6c, 0x3e, 0x68, 0xee, 0x7d, 0xde, 0x5c, 0x53, 0x4c, 0xf3, 0xf4, 0x79, 0x61, 0x73,
- 0x8a, 0x38, 0x0c, 0x3b, 0x21, 0x39, 0x09, 0x51, 0x19, 0xd6, 0xf7, 0x0f, 0xf6, 0x9c, 0xda, 0xd1,
- 0x4e, 0xf5, 0xa0, 0xb1, 0xd7, 0x3c, 0xaa, 0x3a, 0xb5, 0x9d, 0x83, 0xda, 0x9a, 0x6a, 0xde, 0x38,
- 0x7d, 0x5e, 0xd8, 0x98, 0x12, 0x55, 0x29, 0x76, 0x39, 0xbe, 0xa4, 0x39, 0x7c, 0xbc, 0x2b, 0x34,
- 0x5a, 0xaa, 0xe6, 0xb0, 0xef, 0xa7, 0x69, 0x9c, 0xda, 0xa3, 0xbd, 0xcf, 0x6a, 0x6b, 0x99, 0x54,
- 0x8d, 0x23, 0x8b, 0x98, 0xf9, 0xfa, 0x77, 0x3f, 0xe7, 0x95, 0x5f, 0x7f, 0xc9, 0x4f, 0x67, 0x57,
- 0xfe, 0x5e, 0x03, 0x5d, 0xdc, 0x50, 0x74, 0xaa, 0x02, 0xba, 0x5c, 0x3c, 0xd0, 0x76, 0xda, 0x0a,
- 0xce, 0x2c, 0x59, 0xa6, 0x7d, 0x55, 0x3c, 0xae, 0x49, 0x1b, 0xbf, 0xbf, 0xf8, 0xe7, 0x47, 0x6d,
- 0x15, 0x96, 0x25, 0xbf, 0xdd, 0x73, 0x43, 0xb7, 0x8d, 0x29, 0xfa, 0x16, 0x56, 0xfe, 0x5f, 0x6c,
- 0xd0, 0x9d, 0x59, 0x47, 0xe8, 0x52, 0x39, 0x33, 0xef, 0x5e, 0x05, 0x9d, 0xeb, 0x5f, 0xfe, 0x53,
- 0x85, 0x95, 0x49, 0xf1, 0x66, 0x4f, 0x83, 0x3e, 0xfa, 0x02, 0x74, 0xf1, 0x34, 0xa1, 0xd4, 0xd2,
- 0x74, 0xe1, 0x61, 0x33, 0x0b, 0xb3, 0x81, 0xf9, 0x49, 0x7b, 0x70, 0x4d, 0x3e, 0x0e, 0x28, 0x35,
- 0xc2, 0xc5, 0xb7, 0xc7, 0xbc, 0x35, 0x87, 0x98, 0x6b, 0x52, 0x31, 0xce, 0x5e, 0xe6, 0x95, 0xbf,
- 0x5e, 0xe6, 0x95, 0x67, 0xa3, 0xbc, 0x7a, 0x36, 0xca, 0xab, 0x7f, 0x8c, 0xf2, 0xea, 0xdf, 0xa3,
- 0xbc, 0xfa, 0x24, 0xf3, 0x44, 0x6f, 0x65, 0xe5, 0x7f, 0x8b, 0xf7, 0xff, 0x0b, 0x00, 0x00, 0xff,
- 0xff, 0x9a, 0xef, 0x6e, 0xdb, 0xf3, 0x08, 0x00, 0x00,
- }
|