Git Product home page Git Product logo

dot's Introduction

中文
EN

dot

Component development specification, including component definition, component dependencies, component life cycle, dependency injection, and common basic components

  • Dot: A component which has no type or interface requirements, anything can be a component
  • Line: A container that holds components, adds, deletes, modifies, and injects dependencies into components
  • Newer: Construct component, the Newer is used to construct the component, and if it is not specified, then construct it by default "refect.New"
  • Lifer: Is the component life cycle management interface, the implementation of the interface and the method will be automatically run by Line, the following are the four interfaces
Creator
Starter
Stopper
Destroyer
  • Injecter :It is component dependency injection, adding, deleting and checking components. The creation process of components added through this interface is completed by ourselves, which is part of Line

The process that component runs as follows:


Create Config and Log

  1. Make Default Log
  2. Make Config
  3. Make Log of config

Create

  1. Builder.BeforeCreate
  2. dot.Newer
  3. dot.SetterLine
  4. dot.SetterTypeAndLiveId
  5. Events.BeforeCreate //for type id
  6. Events.BeforeCreate //for live id
  7. dot.Creator
  8. Events.AfterCreate //for live id
  9. Events.AfterCreate //for type id, go to "2. Newer", untill all done
  10. Inject all dependentes of dots
  11. AfterAllInjecter
  12. Builder.AfterCreate

Start

  1. Builder.BeforeStart
  2. Events.BeforeStart
  3. Events.BeforeStart //for live id
  4. dot.Starter
  5. Events.AfterStart //for live id
  6. Events.AfterStart //go to "2. Events.BeforeStart", untill all done
  7. dot.AfterAllStart
  8. Builder.AfterStart

Stop

  1. Builder.BeforeStop
  2. dot.BeforeAllStopper
  3. Events.BeforeStop //for type id
  4. Events.BeforeStop //for live id
  5. dot.Stopper
  6. Events.AfterStop //for live id
  7. Events.AfterStop //for type id go to "2. Events.BeforeStop", until all done
  8. Builder.AfterStop

Destroy

  1. Builder.BeforeDestroy
  2. Events.BeforeDestroy //for type id
  3. Events.BeforeDestroy //for live id
  4. dot.Destroyer
  5. Events.AfterStop //for live id
  6. Events.AfterStop //for type id go to "2. Events.BeforeDestroy", until all done
  7. Builder.AfterDestroy

The relationships between components can be set by configuration files or code, Line computes the dependencies between components, regardless of the order in which they are created .

Default components

Config: dots/sconfig

Now use the json format, later will support toml, yaml, command line, and environment variables.

Log: dots/slog

High performance logs based on zap.

GRPC client balance: dots/grpc/conns

Client load balancing for GRPC. "sample /grpc_conns" is an example.

Certificate generated: dots/certificate

Generate root and sub certificates. "sample/certificate" is an example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.