Skip to content
Snippets Groups Projects
gosdn.puml 3.54 KiB
Newer Older
  • Learn to ignore specific revisions
  • @startuml
    namespace nucleus {
        class ClientConfig << (S,Aquamarine) >> {
            + Identifier string
            + Endpoint string
            + Username string
            + Password string
            + GjsonDefaultPath string
            + GjsonConnectionsPath string
    
        }
        class Core << (S,Aquamarine) >> {
            - devices <font color=blue>map</font>[string]Device
            - southboundInterfaces <font color=blue>map</font>[string]interfaces.SouthboundInterface
            - prinipalNetworkDomains <font color=blue>map</font>[uuid.UUID]interfaces.PrincipalNetworkDomain
            - database database.Database
            - config controllerConfig
    
            + IsRunning <font color=blue>chan</font> bool
    
            - readControllerConfig(configFileController string) error
    
            + Init(socket string, configFileController string, configFileClient string, IsRunningChannel <font color=blue>chan</font> bool) 
            + AttachDatabase() 
            + Shutdown() 
    
        }
        class Device << (S,Aquamarine) >> {
            - device ygot.GoStruct
    
            + SBI interfaces.SouthboundInterface
            + Config DeviceConfig
    
        }
        class DeviceConfig << (S,Aquamarine) >> {
            + Identifier uuid.UUID
            + Endpoint string
            + Username string
            + Password string
    
        }
        interface PrincipalNetworkDomain  {
            + Destroy() error
            + AddSbi() error
            + RemoveSbi() error
            + AddDevice( interfaces.Device) error
            + RemoveDevice(uuid uuid.UUID) error
    
        }
        interface SouthboundInterface  {
        }
        class buf << (S,Aquamarine) >> {
            + Write(p []byte) (int, error)
    
        }
        class controllerConfig << (S,Aquamarine) >> {
            + CliSocket string
            + DatabaseSocket string
            + DatabaseUser string
            + DatabasePassword string
            + DatabaseCrypto bool
            + ConfigPath string
    
        }
        class logConnection << (S,Aquamarine) >> {
            - stream proto.GrpcCli_CreateLogStreamServer
            - id string
            - active bool
            - error <font color=blue>chan</font> error
    
        }
        class nucleus.buf << (T, #FF7700) >>  {
        }
        class pndImplementation << (S,Aquamarine) >> {
            - name string
            - sbiContainer <font color=blue>map</font>[string]*interfaces.SouthboundInterface
            - devices <font color=blue>map</font>[uuid.UUID]Device
    
            + Destroy() error
            + AddSbi() error
            + RemoveSbi() error
            + AddDevice(device Device) error
            + RemoveDevice(uuid uuid.UUID) error
    
        }
        class server << (S,Aquamarine) >> {
            - core *Core
            - logConnections []*logConnection
    
            + SayHello(ctx context.Context, in *proto.HelloRequest) (*proto.HelloReply, error)
            + CreateLogStream(req *emptypb.Empty, stream proto.GrpcCli_CreateLogStreamServer) error
            + BroadcastLog(log *proto.LogReply) 
            + Shutdown(ctx context.Context, in *proto.ShutdownRequest) (*proto.ShutdownReply, error)
            + TAPIGetEdge(ctx context.Context, in *proto.TAPIRequest) (*proto.TAPIReply, error)
            + TAPIGetEdgeNode(ctx context.Context, in *proto.TAPIRequest) (*proto.TAPIReply, error)
            + TAPIGetLink(ctx context.Context, in *proto.TAPIRequest) (*proto.TAPIReply, error)
    
        }
    }
    "proto.UnimplementedGrpcCliServer" *-- "nucleus.server"
    
    
    namespace sbi {
        class OpenConfig << (S,Aquamarine) >> {
            - name string
            - clientContainer []Client
    
            + AddClient() error
            + RemoveClient() error
            + CollectHeartbeats() error
            + ListClients() <font color=blue>map</font>[int]interfaces.Client
    
        }
    }
    
    
    "__builtin__.[]byte" #.. "nucleus.buf"
    @enduml