moonbitstack/moonzero/registry does not have a README file
pub(all) enum Balancer {
RoundRobinBalancer(RoundRobin)
PickFirst
WeightedBalancer(WeightedRoundRobin)
}fn InMemoryRegistry::register(self : InMemoryRegistry, service : String, endpoint : Endpoint) -> Stringpub struct LoadBalancedChannel {
resolve : (String) -> Array[Endpoint]
cluster : RpcCluster
balancer : Balancer
service : String
}fn LoadBalancedChannel::call(self : LoadBalancedChannel, path : String, request : Bytes) -> Result[Bytes, Status] raisefn LoadBalancedChannel::call_bidi_streaming(self : LoadBalancedChannel, path : String, requests : Array[Bytes]) -> Result[Array[Bytes], Status] raisefn LoadBalancedChannel::call_server_streaming(self : LoadBalancedChannel, path : String, request : Bytes) -> Result[Array[Bytes], Status] raisefn LoadBalancedChannel::new(resolve : (String) -> Array[Endpoint], cluster : RpcCluster, service : String, balancer? : Balancer) -> LoadBalancedChannelpub struct PersistentRegistry {
instances : Map[String, Map[String, Endpoint]]
key_rev : Map[String, Int64]
seq : Int
revision : Int64
events : Array[RegistryEvent]
watchers : Array[(RegistryEvent) -> Unit]
}fn PersistentRegistry::deregister(self : PersistentRegistry, service : String, key : String) -> Boolfn PersistentRegistry::events_since(self : PersistentRegistry, revision : Int64) -> Array[RegistryEvent]fn PersistentRegistry::register(self : PersistentRegistry, service : String, endpoint : Endpoint) -> Stringpub struct RoundRobin {
cursor : Int
}Install
Download zipA service framework for MoonBit after go-zero: config-driven REST engine and middleware over moonapi, zRPC over moonrpc, discovery on etcd, consul and redis, and go-zero's breaker, shedder and limiters over moonward.