@@ -23,8 +23,8 @@ func SwarmFromGRPC(c swarmapi.Cluster) types.Swarm {
2323 SnapshotInterval : c .Spec .Raft .SnapshotInterval ,
2424 KeepOldSnapshots : c .Spec .Raft .KeepOldSnapshots ,
2525 LogEntriesForSlowFollowers : c .Spec .Raft .LogEntriesForSlowFollowers ,
26- HeartbeatTick : c .Spec .Raft .HeartbeatTick ,
27- ElectionTick : c .Spec .Raft .ElectionTick ,
26+ HeartbeatTick : int ( c .Spec .Raft .HeartbeatTick ) ,
27+ ElectionTick : int ( c .Spec .Raft .ElectionTick ) ,
2828 },
2929 },
3030 },
@@ -35,7 +35,7 @@ func SwarmFromGRPC(c swarmapi.Cluster) types.Swarm {
3535 }
3636
3737 heartbeatPeriod , _ := ptypes .Duration (c .Spec .Dispatcher .HeartbeatPeriod )
38- swarm .Spec .Dispatcher .HeartbeatPeriod = uint64 ( heartbeatPeriod )
38+ swarm .Spec .Dispatcher .HeartbeatPeriod = heartbeatPeriod
3939
4040 swarm .Spec .CAConfig .NodeCertExpiry , _ = ptypes .Duration (c .Spec .CAConfig .NodeCertExpiry )
4141
@@ -73,8 +73,8 @@ func SwarmSpecToGRPC(s types.Spec) (swarmapi.ClusterSpec, error) {
7373 SnapshotInterval : s .Raft .SnapshotInterval ,
7474 KeepOldSnapshots : s .Raft .KeepOldSnapshots ,
7575 LogEntriesForSlowFollowers : s .Raft .LogEntriesForSlowFollowers ,
76- HeartbeatTick : s .Raft .HeartbeatTick ,
77- ElectionTick : s .Raft .ElectionTick ,
76+ HeartbeatTick : uint32 ( s .Raft .HeartbeatTick ) ,
77+ ElectionTick : uint32 ( s .Raft .ElectionTick ) ,
7878 },
7979 Dispatcher : swarmapi.DispatcherConfig {
8080 HeartbeatPeriod : ptypes .DurationProto (time .Duration (s .Dispatcher .HeartbeatPeriod )),
0 commit comments